DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

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

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Using Collection with class (Discriminator.value_map) with no subclasses (i.e redundant discriminator)

Created: 31/Jul/14 12:49 PM   Updated: 10/Aug/14 12:57 PM   Resolved: 07/Aug/14 07:54 AM
Component/s: None
Affects Version/s: 4.0.0.release, 4.0.1
Fix Version/s: 4.0.2

Datastore: H2, Oracle
Severity: Production

 Description  « Hide
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:

Sort Order: Ascending order - Click to sort in descending order
Norbert Bartels added a comment - 31/Jul/14 02:08 PM - edited
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.