Apache JDO Project - [jira] Resolved: (JDO-411) Attempt to bulk-delete Employee records

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > September 2006 > [jira] Resolved: (JDO-411) Attempt to bulk-delete Employee records





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Resolved: (JDO-411) Attempt to bulk-delete Employee records
Michael Bouschen (JIRA)

2006-09-16, 1:12 pm

[ http://issues.apache.org/jira/browse/JDO-411?page=all ]

Michael Bouschen resolved JDO-411.
----------------------------------

Resolution: Fixed

Checked in the patch (see revision 443483).

> Attempt to bulk-delete Employee records without nulling foreign key references from InsurancePlan
> -------------------------------------------------------------------------------------------------
>
> Key: JDO-411
> URL: http://issues.apache.org/jira/browse/JDO-411
> Project: JDO
> Issue Type: Bug
> Components: tck20
> Affects Versions: JDO 2 final
> Reporter: Marc Prud'hommeaux
> Assigned To: Michael Bouschen
> Fix For: JDO 2 maintenance release 1
>
> Attachments: DeletePersistentAll.patch, JDO-411.patch
>
>
> Multiple test cases attempt to bulk delete instances of Person. However, the Employee subclass of Person might wind up having a non-nullable foreign key reference to Insurance or another Employee (via the "mentor" field). While the defaut Derby TCK sche

ma does not have this constraint, in order to be flexible for other databases that will enforce the foreign key by default, some effort should be made to ensure that there are no relation constraints before the bulk deletes are attempted. This can be done
by adding a nullForeignKeyReferences() method that will manually make sure that the relations are nulled. See the attached patch.
> This affects the following tests:
> org.apache.jdo.tck.query.delete.DeletePersistentAll.testNoParametersAPI
> org.apache.jdo.tck.query.delete.DeletePersistentAll.testNoParametersSingleString
> org.apache.jdo.tck.query.delete.DeletePersistentAll.testObjectArrayParametersAPI
> org.apache.jdo.tck.query.delete.DeletePersistentAll.testObjectArrayParametersSingleString
> org.apache.jdo.tck.query.delete.DeletePersistentAll.testMapParametersAPI
> org.apache.jdo.tck.query.delete.DeletePersistentAll.testMapParametersSingleString
> org.apache.jdo.tck.query.delete.DeleteQueryElements.testAPI
> org.apache.jdo.tck.query.delete.DeleteQueryElements.testSingleString


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com