> I just had a look at my test again and I discovered that indeed *JPOX
> does ignore the delete-action="restrict"* for the 1:1 bidirectional
> case. So upon deletion, objects will silently be removed from any 1:1
> bidirectional relationships, and corresponding FK constraints will never
> prevent such a deletion.
>
> I created issue http://www.jpox.org/servlet/jira/browse/CORE-2895 for
> this. Unfortunately yesterday I had been looking at the wrong test.
I'll await the testcase, and the spec clarification before touching it.
I will point out however that several TCK tests fail if I change that due to
FK constraints and the DB objecting to the deletion of an object since it
still has relationships hanging off it. For example
test(org.apache.jdo.tck.extents.CloseAll)javax.jdo.JDODataStoreException:
Delete request failed: DELETE FROM datastoreidentity0.PERSONS WHERE
DATASTORE_IDENTITY=?
[java] at
org.jpox.store.rdbms.request.DeleteRequest.execute(DeleteRequest.java:274)
[java] at
org.jpox.store.rdbms.table.ClassTable.delete(ClassTable.java:2493)
[java] at org.jpox.store.StoreManager.delete(StoreManager.java:902)
[java] at
org.jpox.state.StateManagerImpl.internalDeletePersistent(StateManagerImpl.java:4206)
[java] at
org.jpox.state.StateManagerImpl.deletePersistent(StateManagerImpl.java:4161)
[java] at
org.jpox.AbstractPersistenceManager.internalDeletePersistent(AbstractPersistenceManager.java:1393)
[java] at
org.jpox.AbstractPersistenceManager.deletePersistent(AbstractPersistenceManager.java:1404)
[java] at
org.apache.jdo.tck.extents.ExtentTest.deleteEmployee(ExtentTest.java:200)
[java] at org.apache.jdo.tck.extents.CloseAll.test(CloseAll.java:61)
--
Andy
Java Persistent Objects - JPOX