Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
1.2
Code between sessionFactory.openSession() and session.close():
I generate an ICriteria query, which makes use of a lot property projections
Name and version of the database you are using:
Firebird
Debug level Hibernate log excerpt:
NHibernate.ADOException: could not execute query
[ SELECT this_.NAME as y0_, this_.ACCOUNT_NR as y1_, this_.ID as y2_, this_.ID as y3_, district27x1_.UNIQUE_CODE as y4_, district27x1_.Name as y5_, district27x1_.Blocked as y6_, responsibl2_.NAME as y7_, responsibl2_.SURNAME as y8_, area29x3_.UNIQUE_CODE as y9_, this_.NR as y10_, this_.VATCODE as y11_, this_.FOREIGNER as y12_, this_.ADDRESS as y13_, this_.LINK1 as y14_, this_.LINK2 as y15_, this_.LINK3 as y16_, this_.FAX as y17_, this_.SUBSCRIBER_NAME as y18_, this_.CODE as y19_, this_.CONTRACT_NR as y20_, contractsi4_.Name as y21_, this_.HOME_PAGE as y22_, responsibl2_.NAME_SURNAME as y23_, this_.ID as y24_ FROM CLIENT this_ left outer join DISTRICT_CLASSIFICATORS district27x1_ on this_.DISTRICT_ID=district27x1_.ID left outer join RisingStar_USERS responsibl2_ on this_.RESPONSIBLE_USER_ID=responsibl2_.ID left outer join AREA_CLASSIFICATORS area29x3_ on this_.AREA_ID=area29x3_.ID left outer join CONTRACT_SIGN_T_CLASSIFICATORS contractsi4_ on this_.CONTRACT_SIGN_TYPE_ID=contractsi4_.ID ]
[SQL: SELECT this_.NAME as y0_, this_.ACCOUNT_NR as y1_, this_.ID as y2_, this_.ID as y3_, district27x1_.UNIQUE_CODE as y4_, district27x1_.Name as y5_, district27x1_.Blocked as y6_, responsibl2_.NAME as y7_, responsibl2_.SURNAME as y8_, area29x3_.UNIQUE_CODE as y9_, this_.NR as y10_, this_.VATCODE as y11_, this_.FOREIGNER as y12_, this_.ADDRESS as y13_, this_.LINK1 as y14_, this_.LINK2 as y15_, this_.LINK3 as y16_, this_.FAX as y17_, this_.SUBSCRIBER_NAME as y18_, this_.CODE as y19_, this_.CONTRACT_NR as y20_, contractsi4_.Name as y21_, this_.HOME_PAGE as y22_, responsibl2_.NAME_SURNAME as y23_, this_.ID as y24_ FROM CLIENT this_ left outer join DISTRICT_CLASSIFICATORS district27x1_ on this_.DISTRICT_ID=district27x1_.ID left outer join RisingStar_USERS responsibl2_ on this_.RESPONSIBLE_USER_ID=responsibl2_.ID left outer join AREA_CLASSIFICATORS area29x3_ on this_.AREA_ID=area29x3_.ID left outer join CONTRACT_SIGN_T_CLASSIFICATORS contractsi4_ on this_.CONTRACT_SIGN_TYPE_ID=contractsi4_.ID] ---> NHibernate.AssertionFailure: bug in CollectionType
at NHibernate.Type.CollectionType.NullSafeGet(IDataReader rs, String name, ISessionImplementor session, Object owner)
at NHibernate.Loader.Criteria.CriteriaLoader.GetResultColumnOrRow(Object[] row, IResultTransformer resultTransformer, IDataReader rs, ISessionImplementor session)
at NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet, ISessionImplementor session, QueryParameters queryParameters, LockMode[] lockModeArray, EntityKey optionalObjectKey, IList hydratedObjects, EntityKey[] keys, Boolean returnProxies)
at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
--- End of inner exception stack trace ---
at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria, IList results)
at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria)
at NHibernate.Impl.CriteriaImpl.List()
at DLC.Core.Domain.Bindables.BookBinder.get_DomainObjectValue() in c:\Projects\CoreBookBranch\DLC.Core\Domain\Bindables\BookBinder.cs:line 98
Is this probably mine bug or NHibernate? :)
p.s.
I'll try to make unit tests, which would show how it fails in the evening