|<< 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
|Project:||DataNucleus Store RDBMS|
|Affects Version/s:||4.0.0.release, 4.0.1|
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.
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.