EntityDAC linq with Many-To-Many queries

Discussion of open issues, suggestions and bugs regarding EntityDAC
Post Reply
darnocian
Posts: 5
Joined: Sun 23 Aug 2020 11:07

EntityDAC linq with Many-To-Many queries

Post by darnocian » 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.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: EntityDAC linq with Many-To-Many queries

Post by MaximG » Fri 28 Aug 2020 09:46

Indeed, this feature is not yet implemented, which leads to the error. We'll consider implementing it in the future.

Post Reply