Hi Eric,

Yeah you seem to understand it OK. I'll explain a bit more for the sake of
clarity.

On all our tables we have the following columns

1. CreationDate & CreatedBy
2. ModificationDate & ModifiedBy
3. DeletionDate & DeletedBy

They are all used to track changes and to help when syncing the data with
another DB, specifically for getting incremental changes. In the Peers we
have a method doSelectActive() which returns those records whereby the
DeletionDate & DeletedBy columns are null. Otherwise the record is marked as
deleted/inActive or as Microsoft would say tombstoned :-)

So what I'm looking for is a manner to easily mark a record as inActive, and
also the records via foreignKeys associated with that record. Again this
could involve a number of different tables.

Does this help?

/c


> 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:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to