Reputation: 1414
Previously I had a bug with the fixrelationships
function(Breeze: Differences between Entity Framework and NHibernate with many to many) that has been fixed.
Now I face another problem linked to the fix.
I have an entity Request with a many to many relationship called RequestContact. The many to many is exposed as a many to one on both Request and Contact entities. If I delete a RequestContact from a Request, I got a "null or transient value" error in NHibernate.
What's happening: breeze send my deleted entity over the wire. Once on the server, the relationships of the entity are not loaded (see code line 290) and the delete method crashes since the associations are empty.
The code is similar to my previous post if you want a sample.
Is it a bug? Why associations are not loaded when EntityState
is Deleted
?
I made a fix in this pull request.
Upvotes: 1
Views: 79
Reputation: 3209
It's a bug, but the fix in the pull request causes errors with one-to-one associations in my tests. It needs some more work.
Upvotes: 1