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 Andy Czerwonka <cz...@arcticpenguin.ca> on 2003/10/30 18:13:47 UTC

help with auto-update and/or auto-delete

If I have a 1..n relationship in my object, eg:

Car--->Parts

and I do something like:

Car car = new Car();
car.getParts().add(new Engine());
broker.store(car);

I expect one record in my Car table and one in my Parts table.  Perfect
- that's what I have.

Now, I do a:

car.setParts(new ArrayList());
store(car);

I expect that this removed all records in my Parts table pointing back
to the 'car' instance.

Can't get that to work.  Anyone know why????

-andy


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