Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 08-May-2005 17:52:52   

Hi,

Do you have any idea why the following code might give an 'Object reference not set to an instance of an object' exception?


EntityCollection collection = new EntityCollection(new NewsarticleEntityFactory());
adapter.GetDbCount(collection, null);

Here is the stack trace...

[NullReferenceException: Object reference not set to an instance of an object.] SD.LLBLGen.Pro.DQE.SqlServer.SqlServerSpecificCreator.CreateObjectName(IFieldPersistenceInfo persistenceInfo)

SD.LLBLGen.Pro.DQE.SqlServer.SqlServerSpecificCreator.CreateFieldName(IFieldPersistenceInfo persistenceInfo, String fieldName, String objectAlias, Boolean appendAlias)

SD.LLBLGen.Pro.DQE.SqlServer.SqlServerSpecificCreator.CreateFieldName(IEntityFieldCore fieldCore, IFieldPersistenceInfo persistenceInfo, String fieldName, String objectAlias, Int32& uniqueMarker, Boolean applyAggregateFunction)

SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32& uniqueMarker)

SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreateRowCountDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause) NWN.DatabaseSpecific.DataAccessAdapter.CreateRowCountDQ(IEntityFields2 fieldsToFetch, IFieldPersistenceInfo[] persistenceInfoObjects, IPredicateExpression filter, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause)

SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityFields2 fields, IRelationPredicateBucket filter, IGroupByCollection groupByClause, Boolean allowDuplicates)

SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityCollection2 collection, IRelationPredicateBucket filter)

Cheers,

Ian.

Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 08-May-2005 21:25:29   

Its ok, there appears to be some dependancy issues in my solution. frowning

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 09-May-2005 09:36:53   

DB specific / db generic project out of sync? simple_smile

Frans Bouma | Lead developer LLBLGen Pro