EntityDAC linq with Many-To-Many queries
Posted: Sun 23 Aug 2020 11:33
I couldn't find any documentation really showing how to do queries on many-to-many relations...
When I tried something, I got:
Message: TQueryConverter.TranslateMemberLink: TMetaAssociationManyToMany is not implemented yet (EntityDAC.Linq.Converter.pas, line 268)
Not sure if it is just me not knowing how to do something, it LINQ support doesn't support ManyToMany yet... it would be ideal if it could though...
result := Context.GetEntity<TMyEntity>(
Linq.From(MyEntity).Where(
(MyEntity.MyManyToMany.All(MyOtherEntity.Id = AOtherId)) and
(MyEntity.Id = AID)).Select());
Not sure if this is how it would be done.
When I tried something, I got:
Message: TQueryConverter.TranslateMemberLink: TMetaAssociationManyToMany is not implemented yet (EntityDAC.Linq.Converter.pas, line 268)
Not sure if it is just me not knowing how to do something, it LINQ support doesn't support ManyToMany yet... it would be ideal if it could though...
result := Context.GetEntity<TMyEntity>(
Linq.From(MyEntity).Where(
(MyEntity.MyManyToMany.All(MyOtherEntity.Id = AOtherId)) and
(MyEntity.Id = AID)).Select());
Not sure if this is how it would be done.