Page 1 of 1

EntityDAC linq with Many-To-Many queries

Posted: Sun 23 Aug 2020 11:33
by darnocian
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.

Re: EntityDAC linq with Many-To-Many queries

Posted: Fri 28 Aug 2020 09:46
by MaximG
Indeed, this feature is not yet implemented, which leads to the error. We'll consider implementing it in the future.