You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Craig Russell (JIRA)" <ji...@apache.org> on 2005/10/26 14:32:55 UTC
[jira] Created: (JDO-193) Need new test cases for Map where there is no join table; the key is a field of the value type or the value is a field of the key type
Need new test cases for Map where there is no join table; the key is a field of the value type or the value is a field of the key type
---------------------------------------------------------------------------------------------------------------------------------------
Key: JDO-193
URL: http://issues.apache.org/jira/browse/JDO-193
Project: JDO
Type: Test
Components: tck20
Environment: TCK
Reporter: Craig Russell
JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
<class name="Department">
<field name="employees" mapped-by="dept">
<key mapped-by="id"/>
</field>
</class>
<class name="Employee">
<field name="id" column="ID"/>
<field name="dept" column="DEPT"/>
</class>
Another mapping would have the key of the Map be the Employee and the value be the id.
We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (JDO-193) Need new test cases for Map and List
where there is no join table; the key is a field of the value type or the
value is a field of the key type
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=all ]
Craig Russell updated JDO-193:
------------------------------
Summary: Need new test cases for Map and List where there is no join table; the key is a field of the value type or the value is a field of the key type (was: Need new test cases for Map where there is no join table; the key is a field of the value type or the value is a field of the key type)
> Need new test cases for Map and List where there is no join table; the key is a field of the value type or the value is a field of the key type
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Issue Type: Test
> Components: tck20
> Affects Versions: JDO 2 final
> Environment: TCK
> Reporter: Craig Russell
> Assigned To: Michelle Caisse
> Fix For: JDO 2 maintenance release 1
>
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (JDO-193) Need new test cases for Map where there
is no join table; the key is a field of the value type or the value is a
field of the key type
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=all ]
Craig Russell updated JDO-193:
------------------------------
Fix Version: JDO 2 maintenance release 1
Version: JDO 2 final
(was: JDO 2 beta)
Assign To: Michelle Caisse
JDO also allows mapping Lists where there is no join table, and the ordering element is contained in the related table.
This should be investigated at the same time.
> Need new test cases for Map where there is no join table; the key is a field of the value type or the value is a field of the key type
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 final
> Environment: TCK
> Reporter: Craig Russell
> Assignee: Michelle Caisse
> Fix For: JDO 2 maintenance release 1
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (JDO-193) Need new test cases for Map where there
is no join table; the key is a field of the value type or the value is a
field of the key type
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=all ]
Craig Russell updated JDO-193:
------------------------------
Fix Version: JDO 2 rc1
Version: JDO 2 beta
> Need new test cases for Map where there is no join table; the key is a field of the value type or the value is a field of the key type
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 rc1
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (JDO-193) Need new test cases for Map and List
where there is no join table; the key is a field of the value type or the
value is a field of the key type
Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=comments#action_12436031 ]
Michelle Caisse commented on JDO-193:
-------------------------------------
Added files for mapping List without a join table: revision: 447999
> Need new test cases for Map and List where there is no join table; the key is a field of the value type or the value is a field of the key type
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Issue Type: Test
> Components: tck20
> Affects Versions: JDO 2 final
> Environment: TCK
> Reporter: Craig Russell
> Assigned To: Michelle Caisse
> Fix For: JDO 2 maintenance release 1
>
> Attachments: JDO-193.patch
>
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (JDO-193) Need new test cases for Map where there
is no join table; the key is a field of the value type or the value is a
field of the key type
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=all ]
Craig Russell updated JDO-193:
------------------------------
Fix Version: (was: JDO 2 final)
I propose to defer this for a maintenance revision of the TCK.
> Need new test cases for Map where there is no join table; the key is a field of the value type or the value is a field of the key type
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (JDO-193) Need new test cases for Map and List
where there is no join table; the key is a field of the value type or the
value is a field of the key type
Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=all ]
Michelle Caisse resolved JDO-193.
---------------------------------
Resolution: Fixed
JDO-430 is now tracking the remaining issues on this case.
> Need new test cases for Map and List where there is no join table; the key is a field of the value type or the value is a field of the key type
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Issue Type: Test
> Components: tck20
> Affects Versions: JDO 2 final
> Environment: TCK
> Reporter: Craig Russell
> Assigned To: Michelle Caisse
> Fix For: JDO 2 maintenance release 1
>
> Attachments: JDO-193.patch
>
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (JDO-193) Need new test cases for Map and List
where there is no join table; the key is a field of the value type or the
value is a field of the key type
Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=comments#action_12433490 ]
Michelle Caisse commented on JDO-193:
-------------------------------------
Checked in patch at revision 441641
> Need new test cases for Map and List where there is no join table; the key is a field of the value type or the value is a field of the key type
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Issue Type: Test
> Components: tck20
> Affects Versions: JDO 2 final
> Environment: TCK
> Reporter: Craig Russell
> Assigned To: Michelle Caisse
> Fix For: JDO 2 maintenance release 1
>
> Attachments: JDO-193.patch
>
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (JDO-193) Need new test cases for Map where there
is no join table; the key is a field of the value type or the value is a
field of the key type
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=all ]
Craig Russell updated JDO-193:
------------------------------
Fix Version: JDO 2 final
(was: JDO 2 rc1)
> Need new test cases for Map where there is no join table; the key is a field of the value type or the value is a field of the key type
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 final
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (JDO-193) Need new test cases for Map and List
where there is no join table; the key is a field of the value type or the
value is a field of the key type
Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-193?page=all ]
Michelle Caisse updated JDO-193:
--------------------------------
Attachment: JDO-193.patch
The attached patch implements a test for Map mapped without a join table. The test fails:
javax.jdo.JDOUserException: One or more instances could not be made persistent
at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1293)
at org.apache.jdo.tck.mapping.CompletenessTestMap.localSetUp(CompletenessTestMap.java:78)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:236)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:252)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)
NestedThrowablesStackTrace:
javax.jdo.JDOUserException: Unable to find the field "department" in the class "org.apache.jdo.tck.pc.companyMapWithoutJoin.Person" with a relationship to the field "org.apache.jdo.tck.pc.companyMapWithoutJoin.Department.roles"
at org.jpox.store.rdbms.table.ClassTable.initializeSQLAddUniqueConstraintsStatements(ClassTable.java:1994)
at org.jpox.store.rdbms.table.ClassTable.runSpecifiedCallbacks(ClassTable.java:904)
at org.jpox.store.rdbms.table.ClassTable.runCallBacks(ClassTable.java:869)
at org.jpox.store.rdbms.table.ClassTable.addFieldMetaData(ClassTable.java:562)
at org.jpox.store.rdbms.table.ClassTable.manageClass(ClassTable.java:388)
at org.jpox.store.rdbms.RDBMSManager$ClassAdder.initializeClassTables(RDBMSManager.java:2869)
at org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesAndValidate(RDBMSManager.java:3214)
at org.jpox.store.rdbms.RDBMSManager$ClassAdder.run(RDBMSManager.java:2457)
at org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RDBMSManager.java:2309)
at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.java:725)
at org.jpox.store.rdbms.RDBMSManager.addClass(RDBMSManager.java:739)
at org.jpox.store.StoreManager.getDatastoreClass(StoreManager.java:1142)
at org.jpox.state.StateManagerImpl.populateStrategyFields(StateManagerImpl.java:764)
at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:565)
at org.jpox.state.StateManagerFactory.newStateManager(StateManagerFactory.java:105)
at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1185)
at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1241)
at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1283)
at org.apache.jdo.tck.mapping.CompletenessTestMap.localSetUp(CompletenessTestMap.java:78)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:236)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:252)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122
> Need new test cases for Map and List where there is no join table; the key is a field of the value type or the value is a field of the key type
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JDO-193
> URL: http://issues.apache.org/jira/browse/JDO-193
> Project: JDO
> Issue Type: Test
> Components: tck20
> Affects Versions: JDO 2 final
> Environment: TCK
> Reporter: Craig Russell
> Assigned To: Michelle Caisse
> Fix For: JDO 2 maintenance release 1
>
> Attachments: JDO-193.patch
>
>
> JDO allows mapping of Maps where there is no join table. The metadata for the Employee/Department mapping uses the mapped-by attribute of the map element:
> <class name="Department">
> <field name="employees" mapped-by="dept">
> <key mapped-by="id"/>
> </field>
> </class>
> <class name="Employee">
> <field name="id" column="ID"/>
> <field name="dept" column="DEPT"/>
> </class>
> Another mapping would have the key of the Map be the Employee and the value be the id.
> We should probably define a separate package for this mapping, as there is some confusion in using parts of the Company model where we have changed a significant part of the model.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira