CedricDumont / Effort.Next

MIT License
0 stars 0 forks source link

Reversed properties not quite working #3

Open anna-git opened 8 years ago

anna-git commented 8 years ago

In case you have table B with on column IdTableA referencing table A'Id, when your query is such as : context.TableA.Select(a=>a.TableBCollection.Where(b=>b.WhateverProperty=="whatever")) The where is not working, and I get all rows of table b without my discrimator being taken care of. For example I got : b.Service.Subscriptions.Any(s => s.Attendee.AccountId == accountId)); b is a budget, with a Service Id in the database, but Subscriptions has a Service Id so this is a reverse property, Service is not holding onto subscription, because each subscription iis targeting a service, so Service holds a collection of Subscription. Within that scenario, the Any part is not taken into account, and I get many budgets, even ones, without the matching Subscriptions. Effort has the same problem.

CedricDumont commented 8 years ago

I just forked effort and recompiled it to get some feature I needed. what you could do is fork the repo and try to debug it. Sorry I can't help you in this