You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Joe Germuska <Jo...@Germuska.com> on 2004/06/23 23:18:40 UTC

Making OJB manage composite 1:n relationships (as opposed to aggregate)

In the case where a collection is a "composite" (in the UML sense), 
can OJB manage the details of that?

More specifically: I have an object with a collection.  If when I 
store the object, the members of the collection are different than 
what is in the database, I want the records in the database which are 
not in the current collection to be deleted.

If I were doing the SQL myself, I'd just do a "delete from TABLE 
where fk_col = object_id" before storing the objects.  I suppose as a 
work around I can do that in my DAO manager before asking OJB to 
store the main object.  But it seems like it would be nice to have 
OJB take care of it.

Did I miss it in the docs somewhere?  Is there a different standard 
way of dealing with this?

Thanks
	Joe
-- 
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
    - Carlos Santana

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org