Hi,
Somehow can not create a new thread so did the search and asking.
I am using .NET 8.0 CORE, VS2022 and latest LLBLGen.
When I am using bucket to filter using primary key then I get 'this' populated to count = 1
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.AddWithAnd(DAL.HelperClasses.InkEODSiteFields.EsiEODSiteId == eodSiteId);
bucket.PredicateExpression.AddWithAnd(DAL.HelperClasses.InkEODSiteFields.EsiIsDeleted == false);
ISortExpression sorter = new SortExpression();
using (DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.FetchEntityCollection(this, bucket, 0, null, null, null);
}
after FetchEntityCollection executed I can see this count = 1.
But on same table we have unique index, when filter by below
bucket.PredicateExpression.AddWithAnd(DAL.HelperClasses.InkEODSiteFields.EsiEODSiteURLFrom == eodSiteURLFrom);
this count = 0 and SQL 22 Server Profiler show query OK but data is not in this object (which is IEntityCollection2 collectionToFill)?
if I use below method to fetch data at entity level as it has unique constraint
success = adapter.FetchEntityUsingUniqueConstraint(this, uniqueConstraintFilter, prefetchPath, contextToUse, excludeIncludeFields);
then it does not fetch so I get below message.
'this.EsiABN' threw an exception of type 'SD.LLBLGen.Pro.ORMSupportClasses.ORMEntityOutOfSyncException'