Issue Details (XML | Word | Printable)

Key: NUCRDBMS-817
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Norbert Bartels
Votes: 0
Watchers: 0
Operations

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:

https://github.com/nbartels/test-jdo/tree/bug1




Andy Jefferson made changes - 31/Jul/14 01:40 PM
Field Original Value New Value
Summary Using Collection with class (Discriminator.value_map) throws a exception Using Collection with class (Discriminator.value_map) with no subclasses (i.e redundant discriminator)
Priority Blocker [ 1 ] Major [ 3 ]
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.

Andy Jefferson made changes - 07/Aug/14 07:54 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 4.0.2 [ 12235 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 10/Aug/14 12:57 PM
Status Resolved [ 5 ] Closed [ 6 ]