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 Henrik Berg <he...@ifi.uio.no> on 2003/05/13 12:15:06 UTC
Removing an object in a 1:1 relation
Hi!
Say you have a class A, in which you have a pointer to an object of
class B:
class A {
B b;
}
What I would like to happen, is that if I have an object a of class A,
and say
a.b = null
I would like the object previously referred to by a.b to be deleted
from the database...
Is this in any way possible...?
--
Henrik
Re: Removing an object in a 1:1 relation
Posted by Henrik Berg <he...@ifi.uio.no>.
Henrik Berg <he...@ifi.uio.no> writes:
> What I would like to happen, is that if I have an object a of class A,
> and say
> a.b = null
> I would like the object previously referred to by a.b to be deleted
> from the database...
Or, at least, that the link between a and b is removed, that is,
a.b_id is set to 0 or something. That shouldn't be too hard, should it?
--
Henrik