I have the following example:
ObjectManager.Find<TChildEntity>
.Select(TProjections.Count(csId))
.Where(Linq['ParentEntity'] = SomeId).UniqueValue.
which creates the following SQL:
Select count('id')
from child_entity
where parent_entity_id = 1
This works fine.
But I'd like to use our dictionary for this.
Trying to fetch the Child like this:
ObjectManager.Find<TChildEntity>
.Select(TProjections.Count(csId))
.Where(EntDic.ChildEntity.ParentEntity.Id = SomeId).UniqueValue.
will create the following SQL:
Select count('a.id')
from child_entity a
left join parent_entity b on a.parent_entity_id = b.id
where b.id = 1
How to use the Dictionary, getting the first SQL-Statement?