I have an entity X, that prior to being saved, needs to create/update/remove some related entities. So I've overridden OnBeforeEntitySave in X (not DataAccessAdapter). When I save a single X, this code is triggered, the related entities are manipulated, and the save is successful.
However, when I save an EntityCollection<X>, the call is still made, but the related entites are ignored.
I have verified that the appropriate entities are indeed updated in the object model (they're there before the method exits, and are still there after the save completes.) However, the sql to insert them is never fired. I can modify fields that are directly part of X, and have the updates take, just not the related entities.
Is there a different sequence of events that occurs for saving entity collections? Is there a way to get this to work in another way?
Thanks.