Issue Details (XML | Word | Printable)

Key: CORE-2895
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Joerg von Frantzius
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JPOX Core (ARCHIVED)

delete-action="restricted" is ignored for 1:1 bidirectional

Created: 07/Jul/06 01:17 PM   Updated: 15/Oct/06 03:55 PM   Resolved: 06/Sep/06 10:02 AM
Component/s: None
Affects Version/s: 1.1.1
Fix Version/s: 1.1.2

Datastore: Oracle


 Description  « Hide
When I define a 1:1 bidirectional relationship, create two such related objects, and then delete the object that doesn't have the FK in its class table, it will silently be removed from the relationship before being deleted. That's happens even though I specified delete-action="restricted" on the FK.

Expected behaviour would be the FK constraint being violated upon deletion of the object.

Please see thread "deletePersistent() automatically nulling out referring FKs?!" on mailinglist jdo-dev for details.



Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 07/Jul/06 02:26 PM
And the testcase?

Andy Jefferson added a comment - 06/Sep/06 10:02 AM
Added PMF property "org.jpox.deletionPolicy" with values "JDO2" and "JPOX". The latter option allows for <foreign-key> specifications and leaves it to the datastore to throw the exception (rather than just nulling it)