<< Back to previous view

[NUCRDBMS-817] Using Collection with class (Discriminator.value_map) with no subclasses (i.e redundant discriminator) Created: 31/Jul/14  Updated: 10/Aug/14  Resolved: 07/Aug/14

Status: Closed
Project: DataNucleus Store RDBMS
Component/s: None
Affects Version/s: 4.0.0.release, 4.0.1
Fix Version/s: 4.0.2

Type: Bug Priority: Major
Reporter: Norbert Bartels Assignee: Unassigned
Resolution: Fixed Votes: 0

Datastore: H2, Oracle
Severity: Production

I define a class Person with discriminator strategy "value-map", column "jdo_class" and value "person".
Further I define a class PersonList with a set of the class above.

I generate an instance of the PersonList and make it persistent. Then I generate an instance of the Person and make that persistent.

Now I try to add the Person to the PersonList and get the following error:
java.lang.AssertionError: Failed to persist data : Execution of method "add" on field "pList" caused an error : Cannot set Object parameter: value = Person for column "PERSON.JDO_CLASS" : Unerlaubter Wert "3" für Parameter "parameterIndex"

The german part of the message is: value 3 not allowed for parameter "parameterIndex"

You can find the Testcase here:


Comment by Norbert Bartels [ 31/Jul/14 02:08 PM ]
This happens with subclasses, too. I tried to provide you an example with as less code as possible.

Additional info:
If you change the "Set" in the Personlist to a "List" (e.g. ArrayList) the test case is working - some kind of. At least you don't get an error.
Generated at Fri Jan 19 02:51:02 CET 2018 using JIRA 4.0#466.