Open GoogleCodeExporter opened 9 years ago
Try using this declaration:
[Field, Key(1)]
[Association(OnTargetRemove = OnRemoveAction.Cascade)]
// Or: [Association(OnTargetRemove = OnRemoveAction.Deny)] // Must be default
in this case?
public Language Language { get; private set; }
Original comment by alex.yakunin
on 8 Jul 2010 at 4:19
Original comment by alex.yakunin
on 8 Jul 2010 at 4:19
Actually I had a "brain bug" on this one. I thought the problem was on the
relation between Book and BookTranslation. Now I realized that the exception
says Language... I cannot get it to work by setting Association attribute on
Language property as suggested, but if I add a pairto collection to the
Language class (as below), it works:
[Field, Association(PairTo = "Language", OnOwnerRemove = OnRemoveAction.Deny,
OnTargetRemove = OnRemoveAction.Clear)]
public EntitySet<BookTranslation> Books { get; private set; }
In my opinion it should also have worked with OnOwnerRemove =
OnRemoveAction.Clear directly on the BookTranslation, but that does not work.k
Original comment by t...@faktum.co
on 8 Jul 2010 at 5:26
Original issue reported on code.google.com by
t...@faktum.co
on 8 Jul 2010 at 2:06