Re: Owns destination and other relationship constraints ...
Re: Owns destination and other relationship constraints ...
- Subject: Re: Owns destination and other relationship constraints ...
- From: Alexander Spohr <email@hidden>
- Date: Wed, 14 Apr 2004 10:32:37 +0200
Am 14.04.2004 um 09:35 schrieb Ashley Aitken:
Howdy All,
My understanding of relationships that own their related objects in
EOF is that objects are (automatically) deleted (in Java and, as a
result of EOF, from the database) when they are removed from a
relationship.
Two questions:
1. How does one move an object from one aggregate to another? Does
it just work, to remove it from one aggregate and add it to another,
for example, in code, or will this cause a problem.
no problems here. the deletion will occur in saveChanges, not earlier.
if you hang it into a new relationship it will not be deleted.
2. If you have a relationship set as "owns destination" *must* the
reverse relationship be mandatory and cascade or deny delete?
Optional and nullify or no-action sound problematic.
cascade could cause a problem :) think about it...
mandatory means that eof has to create a target object if you don't
deliver one. not necessary here.
deny should not work either. that will prevent eof from deleting the
"owned" object.
so just do nothing of it at the inverse relationship.
atze
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.