Issue Details (XML | Word | Printable)

Key: NUCRDBMS-683
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Erik Bengtson
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Logical delete of objects

Created: 07/Mar/06 06:59 PM   Updated: 23/Jul/13 11:39 AM
Component/s: ORM, Schema
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
allow to logically delete objects by configuring in metadata that deleted instances of class/interface X is deleted logically.

e.g.
<class X>
<delete-logical>
<column name="YY1" value="UUU"/>
<column name="YY2" value="UUU"/>
</delete-logical>
</class>

values allowed: null, primitives, String, Date (parsed using DateFormat.parse(String s)), and maybe others

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 30/Oct/07 01:11 PM
Would probably be more like
<class name="MyClass">
    ...
    <extension vendor-name="jpox" key="logical-delete" value="true"/>
    <extension vendor-name="jpox" key="logical-delete-column" value="DELETED"/>
</class>

which would then create a DB table with a column (BIT) called "DELETED".

Other changes :-
1. calls to deletePersistent() would just set the DELETED column to 1.
2. retrieval of objects (FetchRequest, JDOQL, SQL, etc) would also need to check that DELETED = 0

Chris Beams added a comment - 31/Oct/07 03:13 AM
FWIW, here's Xcalia's documentation on their implementation of logical deletion. Might be worth taking a look:

http://xdn.xcalia.com/xdn/docs/files/XcaliaCore/5.2.0/documents/html/prog_behavior_-_logical_deletion_behavior.htm