From: NHibernate J. <mik...@us...> - 2006-12-22 03:01:25
|
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 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 |
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 |
From: NHibernate J. <mik...@us...> - 2006-12-22 03:04:25
|
[ http://jira.nhibernate.org/browse/NH-842?page=all ] Ka Man Tong updated NH-842: --------------------------- Attachment: Account.hbm.xml Mapping file after re-ordering. (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 |
From: NHibernate J. <mik...@us...> - 2006-12-22 03:08:42
|
[ http://jira.nhibernate.org/browse/NH-842?page=all ] Ka Man Tong updated NH-842: --------------------------- Attachment: Account-orig.hbm.xml Original mapping which cause the error. (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-orig.hbm.xml, 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 |
From: NHibernate J. <mik...@us...> - 2007-01-02 09:30:28
|
[ http://jira.nhibernate.org/browse/NH-842?page=all ] Sergey Koshcheyev updated NH-842: --------------------------------- Fix Version: 1.2.0.Beta3 Priority: Major (was: Critical) > 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 > Fix For: 1.2.0.Beta3 > Attachments: Account-orig.hbm.xml, 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 |
From: NHibernate J. <mik...@us...> - 2007-01-03 14:31:26
|
[ http://jira.nhibernate.org/browse/NH-842?page=all ] Sergey Koshcheyev closed NH-842: -------------------------------- Fix Version: (was: 1.2.0.Beta3) Resolution: Won't Fix Worked for me in Beta3, will not fix it in 1.0.x. > 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 > Attachments: Account-orig.hbm.xml, 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 |