Many-Many Relationship for EF
A quick update for this request:
We still have some technical hurtles that need to be worked through, but we will get to this.
Ward Bell commented
Chris - take a look at the JsonResultsAdapter. It gives you access to the entity data as they arrive and before Breeze turns them into entities.
Note again that we still believe that using EF many-to-many is a serious design mistake on your part. We would support it anyway if it were easy. But the combination of BAD IDEA + HARD = NOT SOON. If you want to pay us to add it ... that could change its priority significantly. No one has made that offer yet. Therefore, I would not hold my breath on this one.
Chris Cairns commented
The data for many-to-many relationships comes down over the wire, but Breeze then removes that association. This is frustrating, as you can see the data there but cannot access it through the entity object. If there was some way to expose the data in the short term (even if you couldn't use it for full entity tracking) this would be useful.
Lam, Calvin commented
Cannot query or do anything like sorting or grouping or get the firstItem, lastItem or put the where clause on n-n related entities is not realistic in real world application.
any news on this?
Ward Bell commented
@sverre I appreciate that there is interest in this. I differ with you in one crucial part, however: the "junction" entity absolutely IS the EF way. IMO, many-to-many is a giant mistake in EF models because it is unmaintainable. The moment that the relationship needs a payload ... and it could be anything ... a tenantId, isDeleted, dateCreated, concurrencyColumn ... the many-to-many is broken and you HAVE to implement the "junction" entity. If you've build your app around the EF m-2-m and that urgent requirement comes in for the payload ... you are in a mad scramble to fix your app. I strongly advise that you .... and everyone ... avoid this construct from Day 1. You will thank me for this advice in the not-distant-future.
Sverre Andreassen commented
I am wondering how this feature is coming along? I know it is possible to get around this by exposing the junction tables, but it is not the EF way. In my current project this is the last hurdle. Otherwise I am very impressed with Breeze is working wonderfully,