solex
08-29-2002, 04:12 PM
I have a situation where I would like to delete an object, but it may be
used by other objects. I would like to check this before I actually
delete the object from the database. What would be the best way to
architect this requirement?
My example includes a person object (P) and and address object (A). The
GUI makes a request to (P) to delete (A). Where should I put the logic
that states that (A) cannot be deleted if other (P) objects are using it.
A couple of thoughts I had (1) use RI on the database (2) create a
control object that can manage (P) objects. I like option (2) over (1)
but i am not to sure what is the best way to implement it and would like
some suggestions.
Thanks in advance
Dan
used by other objects. I would like to check this before I actually
delete the object from the database. What would be the best way to
architect this requirement?
My example includes a person object (P) and and address object (A). The
GUI makes a request to (P) to delete (A). Where should I put the logic
that states that (A) cannot be deleted if other (P) objects are using it.
A couple of thoughts I had (1) use RI on the database (2) create a
control object that can manage (P) objects. I like option (2) over (1)
but i am not to sure what is the best way to implement it and would like
some suggestions.
Thanks in advance
Dan