GetDbCount does not work

Posts   
 
    
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 05-Oct-2007 08:59:14   

GetDbCount() does not work after upgraded to 4 Oct build.


EntityCollection<UserEntity> collection = new EntityCollection<UserEntity>(new UserEntityFactory());
adapter.GetDbCount(collection, filterBucket)

Object reference not set to an instance of an object.
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityFields2 fields, IRelationPredicateBucket filter, IGroupByCollection groupByClause, Boolean allowDuplicates)
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityCollection2 collection, IRelationPredicateBucket filter, IGroupByCollection groupByClause)
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityCollection2 collection, IRelationPredicateBucket filter)

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 05-Oct-2007 11:31:44   

Does the UserEntity take part an inheritance hierarchy?

Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 05-Oct-2007 11:40:57   

No, it's just a normal entity. It works fine with 24 Spet build.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 05-Oct-2007 11:46:52   

There was a fix in the GetDBCount to solve another issue, so this might have caused this issue. We'll look into it.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 05-Oct-2007 11:52:52   

Hmm. I'll look into it... that's the pain with unittest... you never have enough of them to test all particular situations... I wrote a couple for the complicated situations, they pass.. so a simple situation fails...

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 05-Oct-2007 12:08:18   

I've fixed it. 100% code coverage actually was bad in this case, as it failed in the situation where the collection was NOT about inheritance...

I'll attach a fixed build to this thread a.s.a.p. and will release a new build later today.

(edit): Attached.

Frans Bouma | Lead developer LLBLGen Pro
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 05-Oct-2007 12:13:22   

Thank you simple_smile