Colin

> Clear, this is what I suspected and was hoping for. It concerns an Oracle DB
> app I'm working on.
> 
> If I was to relate this to Criteria could I achieve what you explain by
> joining the necessary tables together, there may be three or four that I
> would have to update. Instead of actually deleting the records we set them
> to inActive.

To clarify, do you want to set inActive=true on all the related rows
when you delete (set inActive=true) a primary row? That's what I'm
guessing from your statement about joining the necessary tables.

This should be possible. You would probably modify BasePeer so that
doUpdate() would set the inActive=true instead of actually deleting the
records and it would set inActive=true on the related rows. You could
even make doSelect() default to getting records where inActive=false to
filter out the "deleted" rows.

This would be a very useful feature. Perhaps, as you may be inferring,
you could add a "inActive" value to the onDelete property of the
foreign-key element in the db schema. That may be the easiest way to use
this feature.

Let me know if I understand your question. I'd be really interested in
using this and I'd be happy to contribute some code.

Eric

-- 
Eric Emminger
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-torque-user-help@;jakarta.apache.org>

Reply via email to