From: NHibernate J. <mik...@us...> - 2006-12-22 03:04:24
|
[ http://jira.nhibernate.org/browse/NH-842?page=all ] Ka Man Tong updated NH-842: --------------------------- Attachment: Account.cs Actual POCO class. (Visible to jira-users) > Generated SQL column name aliased wrong? > ---------------------------------------- > > Key: NH-842 > URL: http://jira.nhibernate.org/browse/NH-842 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.0.2, 1.0.3 > Reporter: Ka Man Tong > Priority: Critical > Attachments: Account.cs, Account.hbm.xml > > I have over 200 fields defined for a table accessing MSSQL 2000. > Some fields have similar prefix (accountId, accountNumber, accountCategoryCode, etc) and I can see NHibernate generate the retrival SQL using the same prefix with some additional numbers and underscore as the column alias. > All fields are in Int32, except one which is of String type. > When retrieving, I got Number Format Exception when NHibernate tries to read some Int32 fields. As I suspect that it was the Nullable issues and I have changed all Int32 fields to NullableInt32. However the case is still the same. > The field mapping XML is defined without any particular order of the fields. > But when I tried to group all AccountXXX fields at the top of the mapping XML, the Number Format Exception doesn't appear anymore. > Is the field mapping ordering important? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |