Hello!

This is my first post to this list and I'm three days old in Castor so
please be kind!

When I call the remove(myObj) method then the myObj is removed from the
persistent store, in other words the corresponding row is deleted from the
database. In some cases I might not want to delete the object but merely
mark it as deleted by setting a boolean value (say IsDeleted) on the row to
true. As it happens, in my project I can't delete anything... everything has
to be marked as deleted and not actually deleted.

My solution to this was to create a persistent field called IsDeleted in all
my objects. When I need to delete this object I set this to true and update
the object. I don't like this because when I use OQL I would like it to
(implicitly) ignore the objects which have been marked as deleted.

Is there any way to do this? 
Has anyone done something similar? 
Is there any way I can override the default behavior of remove to make it
mark objects as deleted instead of actually deleting them?

Thanks.

Ayush

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to