You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(110) |
Nov
(296) |
Dec
(107) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(212) |
Feb
(263) |
Mar
(161) |
Apr
(183) |
May
(183) |
Jun
(75) |
Jul
(106) |
Aug
(88) |
Sep
(227) |
Oct
(143) |
Nov
(154) |
Dec
(53) |
2008 |
Jan
(77) |
Feb
|
Mar
|
Apr
(6) |
May
(103) |
Jun
(296) |
Jul
(54) |
Aug
|
Sep
(379) |
Oct
(283) |
Nov
(224) |
Dec
(214) |
2009 |
Jan
(129) |
Feb
(257) |
Mar
(136) |
Apr
(12) |
May
(329) |
Jun
(434) |
Jul
(375) |
Aug
(171) |
Sep
|
Oct
|
Nov
|
Dec
(54) |
2010 |
Jan
(198) |
Feb
(76) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(62) |
Jul
(210) |
Aug
(447) |
Sep
(330) |
Oct
(257) |
Nov
(133) |
Dec
(453) |
2011 |
Jan
(240) |
Feb
(128) |
Mar
(442) |
Apr
(320) |
May
(428) |
Jun
(141) |
Jul
(13) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: NHibernate J. <mik...@us...> - 2006-10-26 20:33:18
|
[ http://jira.nhibernate.org/browse/NH-686?page=3Dall ] Sergey Koshcheyev updated NH-686: --------------------------------- type: Bug (was: Task) > Formula field in joined subclass possibly works incorrectly > ----------------------------------------------------------- > > Key: NH-686 > URL: http://jira.nhibernate.org/browse/NH-686 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.0.2 > Reporter: Ivanov Mikhail > > I have created the following mapping: > <?xml version=3D"1.0" encoding=3D"utf-8" ?>=20 > <hibernate-mapping xmlns=3D"urn:nhibernate-mapping-2.0"> > <class name=3D"CoreIMSEE.Domain.Partner, CoreIMSEE.Domain" table=3D"P= ARTNER"> > =09=09<id name=3D"Id" column=3D"ID" unsaved-value=3D"0" access=3D"field.c= amelcase"> > =09=09=09<generator class=3D"native" /> > =09=09</id> > =09=09 > =09=09<timestamp name=3D"timestamp" column=3D"TS" access=3D"field"/> > <property name=3D"Code" column=3D"CODE" type=3D"String" length=3D"50"= not-null=3D"true" /> > =09=09<property name=3D"Name" column=3D"NAME" type=3D"String" length=3D"1= 00" not-null=3D"true" /> > =09=09<property name=3D"IsVendor" column=3D"IS_VENDOR" type=3D"YesNo" not= -null=3D"true" /> > =09=09<property name=3D"IsCustomer" column=3D"IS_CUSTOMER" type=3D"YesNo"= not-null=3D"true" /> > =09=09<property name=3D"IsClient" column=3D"IS_CLIENT" type=3D"YesNo" not= -null=3D"true" /> > =09=09<property name=3D"IsActive" column=3D"IS_ACTIVE" type=3D"YesNo" not= -null=3D"true" /> > <property name=3D"IsAutoFax" column=3D"AUTOFAX" type=3D"YesNo" not-= null=3D"true" /> > =09=09<many-to-one name=3D"Address" column=3D"ADDRESS_ID" not-null=3D"tru= e" cascade=3D"all" /> > <many-to-one name=3D"CreatedBy" column=3D"CREATED_BY" not-null=3D"fal= se" cascade=3D"none" /> > <many-to-one name=3D"VerifiedBy" column=3D"VERIFIED_BY" not-null=3D"f= alse" cascade=3D"none" /> > <joined-subclass name=3D"CoreIMSEE.Domain.Customer, CoreIMSEE.Domai= n" table=3D"CUSTOMER"> > =09=09=09<key column=3D"ID" /> > =09=09 > =09=09=09<!--timestamp name=3D"timestamp" column=3D"TS" access=3D"field"/= --> > =09=09=09 > =09=09=09<property name=3D"IsDefault" column=3D"IS_DEFAULT" type=3D"YesNo= " not-null=3D"true" /> > =09=09=09<property name=3D"IsVerified" column=3D"IS_VERIFIED" type=3D"Yes= No" not-null=3D"true" /> > =09=09=09<property name=3D"Name2" column=3D"NAME2" /> > =09=09=09<property name=3D"Name3" column=3D"NAME3" /> > <property name=3D"customerName" formula=3D"(select p.Name from Part= ner p where p.Id =3D Id) + ' ' + Name2 + ' ' + Name3" insert=3D"false" upda= te=3D"false" type=3D"String" access=3D"field" /> > <property name=3D"TaxId" column=3D"TAX_ID" type=3D"String" length= =3D"1" not-null=3D"true" /> > =09=09=09<property name=3D"IsTaxExempt" column=3D"TAX_EXEMPT" type=3D"Yes= No" not-null=3D"true" /> > =09=09=09<property name=3D"TxStatementType" column=3D"TX_STATEMENT_TYPE" = type=3D"String" length=3D"50" not-null=3D"true" /> > =09=09=09<property name=3D"TxStatementFrequency" column=3D"TX_STATEMENT_F= REQ" type=3D"String" length=3D"50" not-null=3D"true" /> > =09=09=09<property name=3D"StorageStatementType" column=3D"STORAGE_STATEM= ENT_TYPE" type=3D"String" length=3D"50" not-null=3D"true" /> > =09=09=09<property name=3D"StorageStatementFrequency" column=3D"STORAGE_S= TATEMENT_FREQ" type=3D"String" length=3D"50" not-null=3D"true" /> > =09=09=09<many-to-one name=3D"BillingAddress" column=3D"BILLING_ADDRESS_I= D" cascade=3D"all"/> > =09=09=09<many-to-one name=3D"ParentCustomer" column=3D"PARENT_ID" /> > <set name=3D"CustomerCrossReference" cascade =3D"all"> > <key column=3D"CUSTOMER_ID"/> > <one-to-many class=3D"CoreIMSEE.Domain.CustomerCrossReference, Co= reIMSEE.Domain"/> > </set> > =09=09=09 > =09=09</joined-subclass> > <!--joined-subclass name=3D"CoreIMSEE.Domain.Vendor, CoreIMSEE.Doma= in" table=3D"VENDOR"> > <key column=3D"ID" /> > =20 > </joined-subclass--> > =09=09=09=09 > =09</class> > </hibernate-mapping> > I want to use property Name from Partner in formula field in Customer. Bu= t this works incorrectly (Excaption occurs) because in generated SQL field = Name translates into <customer_alias>.Name instead of <partner_alias.Name>.= I solved this using (select p.Namr from Partner where p.Id =3D Id) > <property name=3D"customerName" formula=3D"(select p.Name from Part= ner p where p.Id =3D Id) + ' ' + Name2 + ' ' + Name3" insert=3D"false" upda= te=3D"false" type=3D"String" access=3D"field" /> > , but this is nor very effective solution because we can just use Partner= table which is Joined in generated SQL. > SQL: > SELECT customer0_.ID as ID6_, customer0_.IS_VERIFIED as IS_VER3_4_6_, cus= tomer0_.BILLING_ADDRESS_ID as BILLI12_4_6_, customer0_.NAME2 as NAME24_6_, = customer0_.NAME3 as NAME34_6_, customer0_.TX_STATEMENT_FREQ as TX_STA9_4_6_= , customer0_.STORAGE_STATEMENT_TYPE as STORA10_4_6_, customer0_.PARENT_ID a= s PAREN13_4_6_, customer0_.IS_DEFAULT as IS_DEF2_4_6_, customer0_.TAX_EXEMP= T as TAX_EX7_4_6_, customer0_.TX_STATEMENT_TYPE as TX_STA8_4_6_, customer0_= .STORAGE_STATEMENT_FREQ as STORA11_4_6_, customer0_.TAX_ID as TAX_ID4_6_, [= customer0__1_].IS_ACTIVE as IS_ACT8_3_6_, [customer0__1_].NAME as NAME3_6_,= [customer0__1_].ADDRESS_ID as ADDRE10_3_6_, [customer0__1_].IS_CUSTOMER as= IS_CUS6_3_6_, [customer0__1_].VERIFIED_BY as VERIF12_3_6_, [customer0__1_]= .CREATED_BY as CREAT11_3_6_, [customer0__1_].TS as TS3_6_, [customer0__1_].= IS_VENDOR as IS_VEN5_3_6_, [customer0__1_].IS_CLIENT as IS_CLI7_3_6_, [cust= omer0__1_].CODE as CODE3_6_, [customer0__1_].AUTOFAX as AUTOFAX3_6_, custom= er0_.Name + ' ' + customer0_.Name2 + ' ' + customer0_.Name3 as f1_6_, addre= ss1_.ID as ID0_, address1_.STATE_CODE as STATE_CODE0_, address1_.FAX1 as FA= X10_, address1_.STREET2 as STREET20_, address1_.TS as TS0_, address1_.COUNT= RY_CODE as COUNTRY18_0_, address1_.FAX2 as FAX20_, address1_.EMAIL1 as EMAI= L10_, address1_.CITY as CITY0_, address1_.PHONE2 as PHONE20_, address1_.SWI= FT_BIC_CODE as SWIFT_BI8_0_, address1_.ZIP as ZIP0_, address1_.CONTACT1 as = CONTACT10_, address1_.PHONE1 as PHONE10_, address1_.STREET3 as STREET30_, a= ddress1_.STREET1 as STREET10_, address1_.EMAIL2 as EMAIL20_, address1_.CONT= ACT2 as CONTACT20_, address1_.PHONE3 as PHONE30_, state2_.CODE as CODE1_, s= tate2_.DESCRIPTION as DESCRIPT2_1_, state2_.COUNTRY_CODE as COUNTRY_3_1_, c= ountry3_.CODE as CODE2_, country3_.DESCRIPTION as DESCRIPT2_2_, country4_.C= ODE as CODE3_, country4_.DESCRIPTION as DESCRIPT2_3_, user5_.ID as ID4_, us= er5_.EMAIL as EMAIL4_, user5_.PASSWORD_EXPIRES as PASSWORD5_4_, user5_.PHON= E as PHONE4_, user5_.FIRST_NAME as FIRST_NAME4_, user5_.TS as TS4_, user5_.= ROWS_PER_PAGE as ROWS_PE10_4_, user5_.PASSWORD as PASSWORD4_, user5_.PREF_C= ULTURE_NAME as PREF_CU11_4_, user5_.USERNAME as USERNAME4_, user5_.LAST_NAM= E as LAST_NAME4_, user6_.ID as ID5_, user6_.EMAIL as EMAIL5_, user6_.PASSWO= RD_EXPIRES as PASSWORD5_5_, user6_.PHONE as PHONE5_, user6_.FIRST_NAME as F= IRST_NAME5_, user6_.TS as TS5_, user6_.ROWS_PER_PAGE as ROWS_PE10_5_, user6= _.PASSWORD as PASSWORD5_, user6_.PREF_CULTURE_NAME as PREF_CU11_5_, user6_.= USERNAME as USERNAME5_, user6_.LAST_NAME as LAST_NAME5_ FROM CUSTOMER custo= mer0_ inner join PARTNER [customer0__1_] on customer0_.ID=3D[customer0__1_]= .ID left outer join ADDRESS address1_ on customer0_.BILLING_ADDRESS_ID=3Dad= dress1_.ID left outer join STATE state2_ on address1_.STATE_CODE=3Dstate2_.= CODE left outer join COUNTRY country3_ on state2_.COUNTRY_CODE=3Dcountry3_.= CODE left outer join COUNTRY country4_ on address1_.COUNTRY_CODE=3Dcountry4= _.CODE left outer join SYS_USER user5_ on [customer0__1_].VERIFIED_BY=3Duse= r5_.ID left outer join SYS_USER user6_ on [customer0__1_].CREATED_BY=3Duser= 6_.ID WHERE customer0_.ID=3D:ID > Exception details: > System.Data.SqlClient.SqlException: Invalid column name 'Name'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,= Boolean breakConnection) > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException ex= ception, Boolean breakConnection) > at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserS= tateObject stateObj) > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCom= mand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopy= Handler, TdsParserStateObject stateObj) > at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() > at System.Data.SqlClient.SqlDataReader.get_MetaData() > at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader = ds, RunBehavior runBehavior, String resetOptionsString) > at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavio= r cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async= ) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, D= bAsyncResult result) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior beha= vior, String method) > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavio= r behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection s= election, ISessionImplementor session) > 2006-08-05 09:27:00,310 [4940] WARN NHibernate.Util.ADOExceptionReporter= [(null)] - System.Data.SqlClient.SqlException: Invalid column name 'Name'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,= Boolean breakConnection) > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException ex= ception, Boolean breakConnection) > at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserS= tateObject stateObj) > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCom= mand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopy= Handler, TdsParserStateObject stateObj) > at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() > at System.Data.SqlClient.SqlDataReader.get_MetaData() > at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader = ds, RunBehavior runBehavior, String resetOptionsString) > at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavio= r cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async= ) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, D= bAsyncResult result) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior beha= vior, String method) > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavio= r behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection s= election, ISessionImplementor session) > 2006-08-05 09:27:00,310 [4940] ERROR NHibernate.Util.ADOExceptionReporter= [(null)] - Invalid column name 'Name'. > 2006-08-05 09:27:00,310 [4940] DEBUG NHibernate.Impl.BatcherImpl [(null)]= - Closed IDbCommand, open IDbCommands :0 > 2006-08-05 09:27:00,310 [4940] DEBUG NHibernate.Util.ADOExceptionReporter= [(null)] - could not load by id: [CoreIMSEE.Domain.Customer#1] > System.Data.SqlClient.SqlException: Invalid column name 'Name'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,= Boolean breakConnection) > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException ex= ception, Boolean breakConnection) > at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserS= tateObject stateObj) > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCom= mand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopy= Handler, TdsParserStateObject stateObj) > at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() > at System.Data.SqlClient.SqlDataReader.get_MetaData() > at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader = ds, RunBehavior runBehavior, String resetOptionsString) > at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavio= r cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async= ) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, D= bAsyncResult result) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior beha= vior, String method) > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavio= r behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection s= election, ISessionImplementor session) > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, Query= Parameters queryParameters, Object optionalObject, Object optionalId, Objec= t[] optionalCollectionKeys, Boolean returnProxies) > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISe= ssionImplementor session, QueryParameters queryParameters, Object optionalO= bject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnPr= oxies) > at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Ob= ject[] values, IType[] types, Object optionalObject, Object optionalID) > at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Ob= ject id, IType identifierType, Object optionalObject, Object optionalIdenti= fier) > at NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Ob= ject id, Object optionalObject, Object optionalId) > at NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Ob= ject id, Object optionalObject) > at NHibernate.Persister.NormalizedEntityPersister.Load(Object id, Obje= ct optionalObject, LockMode lockMode, ISessionImplementor session) > 2006-08-05 09:27:00,326 [4940] WARN NHibernate.Util.ADOExceptionReporter= [(null)] - System.Data.SqlClient.SqlException: Invalid column name 'Name'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,= Boolean breakConnection) > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException ex= ception, Boolean breakConnection) > at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserS= tateObject stateObj) > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCom= mand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopy= Handler, TdsParserStateObject stateObj) > at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() > at System.Data.SqlClient.SqlDataReader.get_MetaData() > at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader = ds, RunBehavior runBehavior, String resetOptionsString) > at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavio= r cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async= ) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, D= bAsyncResult result) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior beha= vior, String method) > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavio= r behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection s= election, ISessionImplementor session) > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, Query= Parameters queryParameters, Object optionalObject, Object optionalId, Objec= t[] optionalCollectionKeys, Boolean returnProxies) > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISe= ssionImplementor session, QueryParameters queryParameters, Object optionalO= bject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnPr= oxies) > at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Ob= ject[] values, IType[] types, Object optionalObject, Object optionalID) > at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Ob= ject id, IType identifierType, Object optionalObject, Object optionalIdenti= fier) > at NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Ob= ject id, Object optionalObject, Object optionalId) > at NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Ob= ject id, Object optionalObject) > at NHibernate.Persister.NormalizedEntityPersister.Load(Object id, Obje= ct optionalObject, LockMode lockMode, ISessionImplementor session) > 2006-08-05 09:27:00,326 [4940] ERROR NHibernate.Util.ADOExceptionReporter= [(null)] - Invalid column name 'Name'. > 2006-08-05 09:27:00,326 [4940] ERROR CoreIMSEE.Core.Persistence.HqlExecut= or [(null)] - Could not execute query > NHibernate.ADOException: Could not execute query ---> NHibernate.ADOExcep= tion: could not load by id: [CoreIMSEE.Domain.Customer#1] ---> System.Data.= SqlClient.SqlException: Invalid column name 'Name'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,= Boolean breakConnection) > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException ex= ception, Boolean breakConnection) > at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserS= tateObject stateObj) > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCom= mand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopy= Handler, TdsParserStateObject stateObj) > at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() > at System.Data.SqlClient.SqlDataReader.get_MetaData() > at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader = ds, RunBehavior runBehavior, String resetOptionsString) > at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavio= r cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async= ) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, D= bAsyncResult result) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior beha= vior, String method) > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavio= r behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection s= election, ISessionImplementor session) > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, Query= Parameters queryParameters, Object optionalObject, Object optionalId, Objec= t[] optionalCollectionKeys, Boolean returnProxies) > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISe= ssionImplementor session, QueryParameters queryParameters, Object optionalO= bject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnPr= oxies) > at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Ob= ject[] values, IType[] types, Object optionalObject, Object optionalID) > at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Ob= ject id, IType identifierType, Object optionalObject, Object optionalIdenti= fier) > at NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Ob= ject id, Object optionalObject, Object optionalId) > at NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Ob= ject id, Object optionalObject) > at NHibernate.Persister.NormalizedEntityPersister.Load(Object id, Obje= ct optionalObject, LockMode lockMode, ISessionImplementor session) > --- End of inner exception stack trace --- > at NHibernate.Persister.NormalizedEntityPersister.Load(Object id, Obje= ct optionalObject, LockMode lockMode, ISessionImplementor session) > at NHibernate.Impl.SessionImpl.DoLoad(Type theClass, Object id, Object= optionalObject, LockMode lockMode, Boolean checkDeleted) > at NHibernate.Impl.SessionImpl.DoLoadByClass(Type clazz, Object id, Bo= olean checkDeleted, Boolean allowProxyCreation) > at NHibernate.Impl.SessionImpl.InternalLoad(Type clazz, Object id) > at NHibernate.Type.ManyToOneType.ResolveIdentifier(Object id, ISession= Implementor session) > at NHibernate.Type.EntityType.ResolveIdentifier(Object id, ISessionImp= lementor session, Object owner) > at NHibernate.Impl.SessionImpl.InitializeEntity(Object obj) > at NHibernate.Loader.Loader.InitializeEntitiesAndCollections(IList hyd= ratedObjects, Object resultSetId, ISessionImplementor session) > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, Query= Parameters queryParameters, Object optionalObject, Object optionalId, Objec= t[] optionalCollectionKeys, Boolean returnProxies) > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISe= ssionImplementor session, QueryParameters queryParameters, Object optionalO= bject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnPr= oxies) > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryP= arameters queryParameters) > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryPar= ameters queryParameters, ISet querySpaces, IType[] resultTypes) > at NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, Qu= eryParameters queryParameters) > at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters para= meters) > --- End of inner exception stack trace --- > at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters para= meters) > at NHibernate.Impl.QueryImpl.List() > at CoreIMSEE.Core.Persistence.HqlExecutor.Execute(IHqlQueryFilterState= filterState) in C:\Inetpub\wwwroot\CoreIMSEE.HSBC\CoreIMSEE.Core\Core\Pers= istence\HqlExecutor.cs:line 135 > at CoreIMSEE.Core.Persistence.HqlExecutor.Execute(IFilterState filterS= tate) in C:\Inetpub\wwwroot\CoreIMSEE.HSBC\CoreIMSEE.Core\Core\Persistence\= HqlExecutor.cs:line 73 > 2006-08-05 09:27:00,326 [4940] WARN CoreIMSEE.Core.Persistence.PstInterc= eptor [(null)] - exception is thrown, rolling back a transaction and closin= g current session > NHibernate.ADOException: Could not execute query ---> NHibernate.ADOExcep= tion: could not load by id: [CoreIMSEE.Domain.Customer#1] ---> System.Data.= SqlClient.SqlException: Invalid column name 'Name'. > at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,= Boolean breakConnection) > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException ex= ception, Boolean breakConnection) > at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserS= tateObject stateObj) > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCom= mand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopy= Handler, TdsParserStateObject stateObj) > at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() > at System.Data.SqlClient.SqlDataReader.get_MetaData() > at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader = ds, RunBehavior runBehavior, String resetOptionsString) > at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavio= r cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async= ) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, D= bAsyncResult result) > at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior c= mdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) > at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior beha= vior, String method) > at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavio= r behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() > at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection s= election, ISessionImplementor session) > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, Query= Parameters queryParameters, Object optionalObject, Object optionalId, Objec= t[] optionalCollectionKeys, Boolean returnProxies) > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISe= ssionImplementor session, QueryParameters queryParameters, Object optionalO= bject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnPr= oxies) > at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Ob= ject[] values, IType[] types, Object optionalObject, Object optionalID) > at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Ob= ject id, IType identifierType, Object optionalObject, Object optionalIdenti= fier) > at NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Ob= ject id, Object optionalObject, Object optionalId) > at NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Ob= ject id, Object optionalObject) > at NHibernate.Persister.NormalizedEntityPersister.Load(Object id, Obje= ct optionalObject, LockMode lockMode, ISessionImplementor session) > --- End of inner exception stack trace --- > at NHibernate.Persister.NormalizedEntityPersister.Load(Object id, Obje= ct optionalObject, LockMode lockMode, ISessionImplementor session) > at NHibernate.Impl.SessionImpl.DoLoad(Type theClass, Object id, Object= optionalObject, LockMode lockMode, Boolean checkDeleted) > at NHibernate.Impl.SessionImpl.DoLoadByClass(Type clazz, Object id, Bo= olean checkDeleted, Boolean allowProxyCreation) > at NHibernate.Impl.SessionImpl.InternalLoad(Type clazz, Object id) > at NHibernate.Type.ManyToOneType.ResolveIdentifier(Object id, ISession= Implementor session) > at NHibernate.Type.EntityType.ResolveIdentifier(Object id, ISessionImp= lementor session, Object owner) > at NHibernate.Impl.SessionImpl.InitializeEntity(Object obj) > at NHibernate.Loader.Loader.InitializeEntitiesAndCollections(IList hyd= ratedObjects, Object resultSetId, ISessionImplementor session) > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, Query= Parameters queryParameters, Object optionalObject, Object optionalId, Objec= t[] optionalCollectionKeys, Boolean returnProxies) > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISe= ssionImplementor session, QueryParameters queryParameters, Object optionalO= bject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnPr= oxies) > at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryP= arameters queryParameters) > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryPar= ameters queryParameters, ISet querySpaces, IType[] resultTypes) > at NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, Qu= eryParameters queryParameters) > at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters para= meters) > --- End of inner exception stack trace --- > at Spring.Aop.Framework.AbstractMethodInvocation.InvokeJoinpoint() in = C:\dotnet\2005 patched frameworks\Spring.NET 1.1 Preview 2\src\Spring\Sprin= g.Aop\Aop\Framework\AbstractMethodInvocation.cs:line 275 > at Spring.Aop.Framework.AbstractMethodInvocation.Proceed() in C:\dotne= t\2005 patched frameworks\Spring.NET 1.1 Preview 2\src\Spring\Spring.Aop\Ao= p\Framework\AbstractMethodInvocation.cs:line 224 > at CoreIMSEE.Core.Persistence.PstInterceptor.Invoke(IMethodInvocation = invocation) in C:\Inetpub\wwwroot\CoreIMSEE.HSBC\CoreIMSEE.Core\Core\Persis= tence\PstInterceptor.cs:line 80 --=20 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-10-26 20:02:19
|
[ http://jira.nhibernate.org/browse/NH-717?page=comments#action_14228 ] Ayende Rahien commented on NH-717: ---------------------------------- This is a good request, IMO. Just be sure to add the support for both HashedSet<T> and PersistentSet<T>. > Please add Predicate generic set operations to ISet<T> > ------------------------------------------------------ > > Key: NH-717 > URL: http://jira.nhibernate.org/browse/NH-717 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Alpha1 > Reporter: Michael Teper > Priority: Minor > > Things like Find<T>, etc. > http://msdn2.microsoft.com/en-us/library/d9hw1as6.aspx > Thanks! -- 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-10-26 19:59:18
|
[ http://jira.nhibernate.org/browse/NH-717?page=comments#action_14227 ] Fabio Maulo commented on NH-717: -------------------------------- Sorry, I had not seen the title. > Please add Predicate generic set operations to ISet<T> > ------------------------------------------------------ > > Key: NH-717 > URL: http://jira.nhibernate.org/browse/NH-717 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Alpha1 > Reporter: Michael Teper > Priority: Minor > > Things like Find<T>, etc. > http://msdn2.microsoft.com/en-us/library/d9hw1as6.aspx > Thanks! -- 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-10-26 19:53:15
|
[ http://jira.nhibernate.org/browse/NH-738?page=comments#action_14226 ] Fabio Maulo commented on NH-738: -------------------------------- Simple.... not really. The classic HQL parse (the parse of NHb) is something hard to modify. The new AST parse of H3.2 don't support generic. I think you can solve the problem now using a class inherited from Pair<int,string>. public class IdWithValue : Pair<int,string> { public IdValueList(int id, string value):base(id,value) {..... ... } Any way this is an interesting improvement. > HQL select new generics support > ------------------------------- > > Key: NH-738 > URL: http://jira.nhibernate.org/browse/NH-738 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta1 > Reporter: Mike Nichols > > Given class Pair<int,string> that has a constructor Pair(int i, string s), HQL fails to parse out the generic parameter tokens when trying the following expression: 'select new Pair<int,string>(p.Id,p.Name) from Person p' > The <import/> is used to pull in this custom Pair class. > The default error " , expected in SELECT ..." appears, but this is misleading. > Actually, the tokens in the QueryTranslator class' ConcreteQueries() method aren't parsed correctly when generic "<>" symbols are present in the query. It reads the comma in the generic parameter list as a field separator and doesn't recognize the less-than/greater-than symbols. > Seems like this could be a powerful and (simple?) improvement ... -- 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-10-26 19:48:18
|
[ http://jira.nhibernate.org/browse/NH-717?page=comments#action_14225 ] Sergey Koshcheyev commented on NH-717: -------------------------------------- Fabio, he doesn't mean ISession.Find. > Please add Predicate generic set operations to ISet<T> > ------------------------------------------------------ > > Key: NH-717 > URL: http://jira.nhibernate.org/browse/NH-717 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Alpha1 > Reporter: Michael Teper > Priority: Minor > > Things like Find<T>, etc. > http://msdn2.microsoft.com/en-us/library/d9hw1as6.aspx > Thanks! -- 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-10-26 19:35:19
|
[ http://jira.nhibernate.org/browse/NH-717?page=comments#action_14224 ] Fabio Maulo commented on NH-717: -------------------------------- Hi Michael. ISession.Find is obsolete. In 1.2.0.Beta1 you can use ISession.CreateQuery() and it's generic implemetation: List<T>(), UniqueResult<T>() and Enumerable<T> > Please add Predicate generic set operations to ISet<T> > ------------------------------------------------------ > > Key: NH-717 > URL: http://jira.nhibernate.org/browse/NH-717 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Alpha1 > Reporter: Michael Teper > Priority: Minor > > Things like Find<T>, etc. > http://msdn2.microsoft.com/en-us/library/d9hw1as6.aspx > Thanks! -- 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-10-26 19:18:20
|
[ http://jira.nhibernate.org/browse/NH-781?page=all ] Michael Third resolved NH-781: ------------------------------ Resolution: Fixed removed two stuck Lucerne lock files and rebuilt the index > Fix jira issue creation > ----------------------- > > Key: NH-781 > URL: http://jira.nhibernate.org/browse/NH-781 > Project: NHibernate > Type: Task > Reporter: Michael Third > Assignee: Michael Third > Priority: Trivial > -- 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-10-26 19:16:26
|
Fix jira issue creation ----------------------- Key: NH-781 URL: http://jira.nhibernate.org/browse/NH-781 Project: NHibernate Type: Task Reporter: Michael Third Assigned to: Michael Third Priority: Trivial -- 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-10-26 19:09:20
|
[ http://jira.nhibernate.org/browse/NH-772?page=all ] Fabio Maulo closed NH-772: -------------------------- Resolution: Not an Issue > "System.NullReferenceException": When load entity class form table's column contained NULL value. > ------------------------------------------------------------------------------------------------- > > Key: NH-772 > URL: http://jira.nhibernate.org/browse/NH-772 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.Beta1 > Reporter: TREEBHOPH > Priority: Minor > Attachments: NH-BUG.zip > > "System.NullReferenceException: Object reference not set to an instance of an object" > I get this ERROR when i try to load Entity Class from a table's column contained NULL value, the column's type is MySql Varchar; however if the colums has some value , the entity class can be loaded without ERROR! > The class that i load is a single class that no relationship to another class. > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> > <class name="DomainModelObject.GlobalUserAccount, DomainModelObject" table="glb_user_account" lazy="false"> > <id name="UserID" column="user_id" type="Int64"> > <generator class="identity" /> > </id> > <property name="LoginName" column="user_login_name" type="String" length="50" /> > <property name="Password" column="user_passwd" type="String" length="200" /> > <property name="Email" column="user_email" type="String" length="50" /> > <property name="RegistTime" column="user_create_time" type="DateTime" /> > </class> > </hibernate-mapping> -- 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-10-26 19:09:19
|
[ http://jira.nhibernate.org/browse/NH-772?page=comments#action_14222 ] Fabio Maulo commented on NH-772: -------------------------------- Yes you recive an Error and is normal! This is not an issue. The problem is the code of your class. Your mapping don't specify the access method; the default is property. This is what you are doing for each property. set{ this._resetPasswordCode = value.Trim(); } If in the DB you have a null, when NHb intent to assign property by property_set the variable "value" is null so value.Trim() throw an NullReferenceException. To solve the problem look documentation for <access> tag for the property or use <default-access> of the mapping file to configure NHb to access to the field instead property. > "System.NullReferenceException": When load entity class form table's column contained NULL value. > ------------------------------------------------------------------------------------------------- > > Key: NH-772 > URL: http://jira.nhibernate.org/browse/NH-772 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.Beta1 > Reporter: TREEBHOPH > Priority: Minor > Attachments: NH-BUG.zip > > "System.NullReferenceException: Object reference not set to an instance of an object" > I get this ERROR when i try to load Entity Class from a table's column contained NULL value, the column's type is MySql Varchar; however if the colums has some value , the entity class can be loaded without ERROR! > The class that i load is a single class that no relationship to another class. > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> > <class name="DomainModelObject.GlobalUserAccount, DomainModelObject" table="glb_user_account" lazy="false"> > <id name="UserID" column="user_id" type="Int64"> > <generator class="identity" /> > </id> > <property name="LoginName" column="user_login_name" type="String" length="50" /> > <property name="Password" column="user_passwd" type="String" length="200" /> > <property name="Email" column="user_email" type="String" length="50" /> > <property name="RegistTime" column="user_create_time" type="DateTime" /> > </class> > </hibernate-mapping> -- 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-10-26 18:33:17
|
[ http://jira.nhibernate.org/browse/NH-772?page=comments#action_14221 ] TREEBHOPH commented on NH-772: ------------------------------ It still Error.. I just add Attachment files contained class, mapping, code and a log file. The Error always arise when I try to load class form table's column contained Null, Column Type is Varchar > "System.NullReferenceException": When load entity class form table's column contained NULL value. > ------------------------------------------------------------------------------------------------- > > Key: NH-772 > URL: http://jira.nhibernate.org/browse/NH-772 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.Beta1 > Reporter: TREEBHOPH > Priority: Minor > Attachments: NH-BUG.zip > > "System.NullReferenceException: Object reference not set to an instance of an object" > I get this ERROR when i try to load Entity Class from a table's column contained NULL value, the column's type is MySql Varchar; however if the colums has some value , the entity class can be loaded without ERROR! > The class that i load is a single class that no relationship to another class. > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> > <class name="DomainModelObject.GlobalUserAccount, DomainModelObject" table="glb_user_account" lazy="false"> > <id name="UserID" column="user_id" type="Int64"> > <generator class="identity" /> > </id> > <property name="LoginName" column="user_login_name" type="String" length="50" /> > <property name="Password" column="user_passwd" type="String" length="200" /> > <property name="Email" column="user_email" type="String" length="50" /> > <property name="RegistTime" column="user_create_time" type="DateTime" /> > </class> > </hibernate-mapping> -- 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-10-26 18:28:57
|
[ http://jira.nhibernate.org/browse/NH-772?page=all ] TREEBHOPH updated NH-772: ------------------------- Attachment: NH-BUG.zip class, mappings, code > "System.NullReferenceException": When load entity class form table's column contained NULL value. > ------------------------------------------------------------------------------------------------- > > Key: NH-772 > URL: http://jira.nhibernate.org/browse/NH-772 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.Beta1 > Reporter: TREEBHOPH > Priority: Minor > Attachments: NH-BUG.zip > > "System.NullReferenceException: Object reference not set to an instance of an object" > I get this ERROR when i try to load Entity Class from a table's column contained NULL value, the column's type is MySql Varchar; however if the colums has some value , the entity class can be loaded without ERROR! > The class that i load is a single class that no relationship to another class. > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> > <class name="DomainModelObject.GlobalUserAccount, DomainModelObject" table="glb_user_account" lazy="false"> > <id name="UserID" column="user_id" type="Int64"> > <generator class="identity" /> > </id> > <property name="LoginName" column="user_login_name" type="String" length="50" /> > <property name="Password" column="user_passwd" type="String" length="200" /> > <property name="Email" column="user_email" type="String" length="50" /> > <property name="RegistTime" column="user_create_time" type="DateTime" /> > </class> > </hibernate-mapping> -- 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-10-26 16:33:32
|
Obsolete code in the tips 'n tricks ----------------------------------- Key: NH-780 URL: http://jira.nhibernate.org/browse/NH-780 Project: NHibernate Type: Improvement Components: Documentation Versions: 1.2.0.Beta1 Reporter: Guy Mahieu Priority: Trivial >From the docs: <blockquote/> 11.13. Tips & Tricks You can count the number of query results without actually returning them: <code> IEnumerator countEn = session.Enumerable("select count(*) from ....").GetEnumerator(); countEn.MoveNext(); int count = (int) countEn.Current; </code> </blockquote> Other than looking like a workaround, this uses obsolete code (session.Enumerable); it might be better to change it to: <code> int count = (int) session.CreateQuery("select count(*) from ...").UniqueResult(); </code> -- 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-10-26 11:55:32
|
abstract class not recognized using multiple mapping files ---------------------------------------------------------- Key: NH-779 URL: http://jira.nhibernate.org/browse/NH-779 Project: NHibernate Type: Bug Versions: 1.0.2 Reporter: Hace When an abstract class and (one or more) joined-subclasses are not in one mapping file, but joined-subclasses are in separate mappingfiles, the connection between the abstract class and the joined subclasses is lost. An error of 'cannot instantiate abstract class' occurs. [ AbstractClass.hbm.xml ] <hibernate-mapping> <class name="Namespace.Common.AbstractClass, Namespace.Common" table="GeneralItem"> <id name="GeneralItemId" type="Int32" column="GeneralItemId" > <generator class="identity"/> </id> <property name="GeneralText" column="GeneralText" /> <joined-subclass name="Namespace.Common.A.ConcreteClassA, Namespace.Common.A" table="ItemsA" extends="Namespace.Common.AbstractClass, Namespace.Common"> <key column="GeneralItemId" /> ..concrete properties for A.. </joined-subclass> </class> </hibernate-mapping> [ ConcreteClassB.hbm.xml ] <hibernate-mapping> <joined-subclass name="Namespace.Common.B.ConcreteClassB, Namespace.Common.B" table="ItemsB" extends="Namespace.Common.AbstractClass, Namespace.Common"> <key column="GeneralItemId" /> ..concrete properties for B.. </joined-subclass> </hibernate-mapping> Items for ConcreteClassB will not be loaded correctly, only because the joined-subclass is not in the SAME mappingfile as ConcreteClassA ? [ Code ] List<AbstractClass> itemList = new List<AbstractClass>(); ISession session = OurSession.CurrentSession; ICriteria NHibernateCriteria = session.CreateCriteria(typeof(AbstractClass)); NHibernateCriteria.Add(Expression.In("GeneralItemId", generalItemIds.ToArray())); try { IEnumerable<AbstractClass> enumerable = (AbstractClass[])ArrayList.Adapter(NHibernateCriteria.List()).ToArray(typeof(AbstractClass)); itemList = new List<AbstractClass>(enumerable); } catch(Exception exception) { ... log exception.. } ...... dostuff foreach(ConcreteClassA in itemList) .... [ /code ] -- 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-10-26 10:58:29
|
[ http://jira.nhibernate.org/browse/NH-778?page=all ] Sergey Koshcheyev resolved NH-778: ---------------------------------- Fix Version: 1.2.0.Beta2 Resolution: Fixed > Adding pascalcase-m (without the underscore) > -------------------------------------------- > > Key: NH-778 > URL: http://jira.nhibernate.org/browse/NH-778 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta1 > Reporter: Per Weinberger > Priority: Trivial > Fix For: 1.2.0.Beta2 > Attachments: pascalcase-m.patch > > I've implemented support for field naming strategy pascalcase-m, i.e. "The name of the Field in PascalCase format prefixed with an 'm'.", e.g. > private long mId; > [NHibernate.Mapping.Attributes.Id(0, Name="Id",Access="nosetter.pascalcase-m")] > public virtual long Id > { > get { return mId; } > } > How do I submit this? > Regards, > Per Weinberger -- 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-10-26 08:19:32
|
[ http://jira.nhibernate.org/browse/NH-778?page=comments#action_14214 ] Sergey Koshcheyev commented on NH-778: -------------------------------------- Looks fine. > Adding pascalcase-m (without the underscore) > -------------------------------------------- > > Key: NH-778 > URL: http://jira.nhibernate.org/browse/NH-778 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta1 > Reporter: Per Weinberger > Priority: Trivial > Attachments: pascalcase-m.patch > > I've implemented support for field naming strategy pascalcase-m, i.e. "The name of the Field in PascalCase format prefixed with an 'm'.", e.g. > private long mId; > [NHibernate.Mapping.Attributes.Id(0, Name="Id",Access="nosetter.pascalcase-m")] > public virtual long Id > { > get { return mId; } > } > How do I submit this? > Regards, > Per Weinberger -- 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-10-26 08:14:29
|
[ http://jira.nhibernate.org/browse/NH-778?page=all ] Per Weinberger updated NH-778: ------------------------------ Attachment: pascalcase-m.patch Hope this is in the correct format. Created using TortoiseSVN. > Adding pascalcase-m (without the underscore) > -------------------------------------------- > > Key: NH-778 > URL: http://jira.nhibernate.org/browse/NH-778 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta1 > Reporter: Per Weinberger > Priority: Trivial > Attachments: pascalcase-m.patch > > I've implemented support for field naming strategy pascalcase-m, i.e. "The name of the Field in PascalCase format prefixed with an 'm'.", e.g. > private long mId; > [NHibernate.Mapping.Attributes.Id(0, Name="Id",Access="nosetter.pascalcase-m")] > public virtual long Id > { > get { return mId; } > } > How do I submit this? > Regards, > Per Weinberger -- 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-10-26 08:12:28
|
[ http://jira.nhibernate.org/browse/NH-778?page=comments#action_14212 ] Sergey Koshcheyev commented on NH-778: -------------------------------------- Subversion can create it for you. If you are using TortoiseSVN, there is an option to create a patch. Or you can do it manually using 'diff' for Win32 if you can find one. Subversion option is by far the easiest. > Adding pascalcase-m (without the underscore) > -------------------------------------------- > > Key: NH-778 > URL: http://jira.nhibernate.org/browse/NH-778 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta1 > Reporter: Per Weinberger > Priority: Trivial > > I've implemented support for field naming strategy pascalcase-m, i.e. "The name of the Field in PascalCase format prefixed with an 'm'.", e.g. > private long mId; > [NHibernate.Mapping.Attributes.Id(0, Name="Id",Access="nosetter.pascalcase-m")] > public virtual long Id > { > get { return mId; } > } > How do I submit this? > Regards, > Per Weinberger -- 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-10-26 08:03:28
|
[ http://jira.nhibernate.org/browse/NH-778?page=comments#action_14211 ] Per Weinberger commented on NH-778: ----------------------------------- Sorry for not being in the know. Could you please direct me to documentation on how to create a patch. Regards, Per Weinberger > Adding pascalcase-m (without the underscore) > -------------------------------------------- > > Key: NH-778 > URL: http://jira.nhibernate.org/browse/NH-778 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta1 > Reporter: Per Weinberger > Priority: Trivial > > I've implemented support for field naming strategy pascalcase-m, i.e. "The name of the Field in PascalCase format prefixed with an 'm'.", e.g. > private long mId; > [NHibernate.Mapping.Attributes.Id(0, Name="Id",Access="nosetter.pascalcase-m")] > public virtual long Id > { > get { return mId; } > } > How do I submit this? > Regards, > Per Weinberger -- 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-10-26 07:56:29
|
[ http://jira.nhibernate.org/browse/NH-778?page=comments#action_14210 ] Sergey Koshcheyev commented on NH-778: -------------------------------------- Attach the patch here. > Adding pascalcase-m (without the underscore) > -------------------------------------------- > > Key: NH-778 > URL: http://jira.nhibernate.org/browse/NH-778 > Project: NHibernate > Type: Improvement > Components: Core > Versions: 1.2.0.Beta1 > Reporter: Per Weinberger > Priority: Trivial > > I've implemented support for field naming strategy pascalcase-m, i.e. "The name of the Field in PascalCase format prefixed with an 'm'.", e.g. > private long mId; > [NHibernate.Mapping.Attributes.Id(0, Name="Id",Access="nosetter.pascalcase-m")] > public virtual long Id > { > get { return mId; } > } > How do I submit this? > Regards, > Per Weinberger -- 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-10-26 07:47:34
|
Adding pascalcase-m (without the underscore) -------------------------------------------- Key: NH-778 URL: http://jira.nhibernate.org/browse/NH-778 Project: NHibernate Type: Improvement Components: Core Versions: 1.2.0.Beta1 Reporter: Per Weinberger Priority: Trivial I've implemented support for field naming strategy pascalcase-m, i.e. "The name of the Field in PascalCase format prefixed with an 'm'.", e.g. private long mId; [NHibernate.Mapping.Attributes.Id(0, Name="Id",Access="nosetter.pascalcase-m")] public virtual long Id { get { return mId; } } How do I submit this? Regards, Per Weinberger -- 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-10-26 06:01:34
|
ArgumentNullException: Value cannot be null. Reflection exception. ------------------------------------------------------------------ Key: NH-777 URL: http://jira.nhibernate.org/browse/NH-777 Project: NHibernate Type: Bug Components: Reflection Optimizer Versions: 1.2.0.Beta1 Reporter: Henrik Feldt Attachments: Business Entities.rar Problem loading and using mapping files - Reflection error. Stack trace: [ArgumentNullException: Value cannot be null. Parameter name: methodInfo] System.Reflection.Emit.DynamicILGenerator.EmitCall(OpCode opcode, MethodInfo methodInfo, Type[] optionalParameterTypes) +1607931 NHibernate.Property.BasicSetter.Emit(ILGenerator il) +111 NHibernate.Bytecode.Lightweight.ReflectionOptimizer.GenerateSetPropertyValuesMethod(IGetter[] getters, ISetter[] setters) +726 NHibernate.Bytecode.Lightweight.ReflectionOptimizer..ctor(Type mappedType, IGetter[] getters, ISetter[] setters) +146 NHibernate.Bytecode.Lightweight.BytecodeProviderImpl.GetReflectionOptimizer(Type mappedClass, IGetter[] getters, ISetter[] setters) +55 NHibernate.Persister.Entity.AbstractEntityPersister..ctor(PersistentClass persistentClass, ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory) +6110 NHibernate.Persister.Entity.SingleTableEntityPersister..ctor(PersistentClass model, ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory, IMapping mapping) +173 NHibernate.Persister.PersisterFactory.CreateClassPersister(PersistentClass model, ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory, IMapping cfg) +145 NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings) +1316 NHibernate.Cfg.Configuration.BuildSessionFactory() +111 _Default.GetEntries() in d:\Default.aspx.cs:39 _Default.btnListEntries_Click(Object sender, EventArgs e) in d:\Default.aspx.cs:90 Environment: Windows XP SP2, IIS 5.0, Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210 -- 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-10-25 19:53:37
|
[ http://jira.nhibernate.org/browse/NH-774?page=comments#action_14205 ] Ayende Rahien commented on NH-774: ---------------------------------- What _was_ the issue? Sending unicode text to Oracle? Can you try using the sample project with unicode parameters and see if it behave the same way? > Oracle Performance using Load > ----------------------------- > > Key: NH-774 > URL: http://jira.nhibernate.org/browse/NH-774 > Project: NHibernate > Type: Patch > Components: Data Providers > Versions: 1.0, 1.0.2 > Reporter: Jorge > Attachments: CreateQuery.txt, CreateSQLQuery.txt, Load.txt, Load.txt, PerformanceNHibernate.rar, PerformanceNHibernate.rar > > I have developed a application using NHibernate version 1.0.2.0 (in the version 1.0.0.0 the same behaviour) over ORACLE version 10.2.0.1.0 in the Server and the same version for the Oracle Client. > I am using C#, .NET 2.0 and Visual Studio 2005. > I have a table with more than 1 million records, and the object to build has one property for each field in the table. It means nothing special. > When i am trying to load one object using the primary key with session.Load() spends about 3 seconds, while if i use session.CreateSQLQuery() to get the same object using the primary key as weel it spends about 0,05 seconds. the query using CreateSQLQuery is: > SELECT {a.*} FROM REGDI a WHERE REGDIID='" + myREGDIID + "'"; > and query in the Load is : > SELECT regdi0_.REGDIID as REGDIID0_, regdi0_.REGID as REGID0_, regdi0_.DITAHUN as DITAHUN0_, regdi0_.DIKODE as DIKODE0_, regdi0_.DINOMOR as DINOMOR0_, regdi0_.DITANGGAL as DITANGGAL0_ FROM REGDI regdi0_ WHERE regdi0_.REGDIID=:p0 > If do the same test with a few data in the table (about 10,000) is working both methods quickly. But if the table has 1 million records the load take a long time. > I have debud the application and the problem is in the method DoQuery() in the class NHibernate.Loader.Loader. And in the line 326: > for( count = 0; count < maxRows && rs.Read(); count++ ) > To do the rs.Read() takes about 3 seconds. > the object rs is a System.Data.OracleClient.OracleDataReader > and the query to do is : > SELECT regdi0_.REGDIID as REGDIID0_, regdi0_.REGID as REGID0_, > regdi0_.DITAHUN as DITAHUN0_, regdi0_.DIKODE as DIKODE0_, > regdi0_.DINOMOR as DINOMOR0_, regdi0_.DITANGGAL as DITANGGAL0_ > FROM REGDI regdi0_ WHERE regdi0_.REGDIID=:p0 > I think there is something strange building the OracleCommand inside the NHibernate. Someone else has the same problem?? Anyone has some clues? > I attach a small project in VS2005 showing the problem. > Thank you in advance. > Jorge. > ********* XML Mapping ***** > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> > <class name="PerformanceNHibernate.RegDI, PerformanceNHibernate" > table="REGDI" > > <id name="RDI_RegDIId" column="REGDIID" type="String"> > <generator class="uuid.hex"/> > </id> > <property name ="RDI_RegisterLink" column ="REGID" type ="String"/> > <property column="DIKODE" type="String" name="RDI_DICode" not-null="true" length="6" /> > <property column="DINOMOR" type="String" name="RDI_DINomor" length="30" /> > <property column="DITAHUN" type="Int32" name="RDI_DIYear" /> > <property column="DITANGGAL" type="DateTime" name="RDI_DIDate" /> > </class> > </hibernate-mapping> > ******* Class Definition ******** > using System; > namespace PerformanceNHibernate > { > [Serializable] > public class RegDI > { > private string _regdiid;//identifier > private string _regid; > private string _dicode; > private string _dinomor; > private int? _diyear; > private DateTime? _didate; > public RegDI() > { > } > public string RDI_RegDIId > { > get { return _regdiid; } > set { _regdiid = value; } > } > public string RDI_RegisterLink > { > get { return _regid; } > set { _regid = value; } > } > /// <summary> > /// > /// </summary> public string RDI_DICode > { > get { return _dicode; } > set { _dicode = value; } > } > /// <summary> > /// > /// </summary> public string RDI_DINomor > { > get { return _dinomor; } > set { _dinomor = value; } > } > /// <summary> > /// > /// </summary> public int? RDI_DIYear > { > get { return _diyear; } > set { _diyear = value; } > } > /// <summary> > /// > /// </summary> public DateTime? RDI_DIDate > { > get { return _didate; } > set { _didate = value; } > } > public override bool Equals(object obj) > { > bool response = false; > if (this.RDI_RegDIId.Equals(((RegDI)obj).RDI_RegDIId)) > { > response = true; > } > return response; > } > public override int GetHashCode() > { > return ((String)this.RDI_RegDIId).GetHashCode(); > } > }//end of public class > }//end of namespace > ******* Table in ORACLE ************ > CREATE TABLE REGDI ( > REGDIID VARCHAR2(32) NOT NULL, > REGID VARCHAR2(32) NOT NULL, > DIKODE VARCHAR2(6) NOT NULL, > DINOMOR VARCHAR2(30), > DITAHUN NUMBER(4), > DITANGGAL DATE); > ALTER TABLE REGDI ADD ( > CONSTRAINT PK_REGDI PRIMARY KEY (REGDIID)); > CREATE INDEX I1TRANSDI ON REGDI (DIKODE, DINOMOR, DITAHUN); > CREATE INDEX I2TRANSDI ON REGDI (DIKODE, DITAHUN, DINOMOR); > CREATE INDEX I2REGDI ON REGDI (REGID, DIKODE); > ***************************** -- 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-10-25 19:36:30
|
[ http://jira.nhibernate.org/browse/NH-776?page=all ] Cris Constantin updated NH-776: ------------------------------- Attachment: NH776.zip Attached the test. Hibernate 3.2 has the "lazy" attribute on the one-to-one mapping, maybe it should be ported? > one-to-one to proxied types not handling missing associated classes correctly (as null) > --------------------------------------------------------------------------------------- > > Key: NH-776 > URL: http://jira.nhibernate.org/browse/NH-776 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.Beta2, 1.2.0.Beta1 > Reporter: Cris Constantin > Attachments: NH776.zip > > version 1.0.2 correctly return nulls for missing associated classes, even when the associated type was proxied. 1.2.0 throws No row with the given identifier exists. -- 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-10-25 18:48:35
|
one-to-one to proxied types not handling missing associated classes correctly (as null) --------------------------------------------------------------------------------------- Key: NH-776 URL: http://jira.nhibernate.org/browse/NH-776 Project: NHibernate Type: Bug Components: Core Versions: 1.2.0.Beta2, 1.2.0.Beta1 Reporter: Cris Constantin version 1.0.2 correctly return nulls for missing associated classes, even when the associated type was proxied. 1.2.0 throws No row with the given identifier exists. -- 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 |