Issue Details (XML | Word | Printable)

Key: NUCJPA-88
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Unassigned
Reporter: Jonathan Lawson
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus API JPA

@Version field present in @MappedSuperclass not incremented on update

Created: 22/Nov/10 10:49 PM   Updated: 08/Dec/10 03:28 PM   Resolved: 23/Nov/10 11:09 AM
Component/s: API
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. Zip Archive Bug Report Repackaged.zip (3 kB)
2. Zip Archive BugReport.zip (2 kB)

Environment: Google appengine Eclipse plugin 1.3.8 SDK under windows XP


 Description  « Hide
A field with an @Version annotation placed in a superclass annotated with @MappedSuperclass seems not to be updated on commit. The VERSION field looks like it is created but the version variable stays set at 0. If the code is untouched except that the field with the @Version annotation is moved into the @Entity subclass then it works as expected.

Jonathan Lawson added a comment - 22/Nov/10 11:58 PM - edited
Test case files.

This defines a servlet that demonstrates the problem. Also included is the output produced.

This should be everything needed to reproduce the problem.

Note that this test case is slightly complicated by defining two version fields for the case that works, but the result is more revealing like this.

Jonathan Lawson made changes - 22/Nov/10 11:58 PM
Field Original Value New Value
Attachment BugReport.zip [ 11313 ]
Andy Jefferson added a comment - 23/Nov/10 07:11 AM
Please follow the DataNucleus problem testcase format, as linked on the front page of JIRA, in the docs, and the forum
http://www.datanucleus.org/project/problem_jpa_testcase.html

Jonathan Lawson added a comment - 23/Nov/10 10:36 AM
Repackaged bug report according to standards.

Note that I tested this by invoking main from within a servlet in google appengine, since this is the only test environment I have. However the only dependency on this environment is the ConnectionURL in persistence.xml which is "appengine". This may need to be changed. I doubt the problem is provider dependent though.

Jonathan Lawson made changes - 23/Nov/10 10:36 AM
Attachment Bug Report Repackaged.zip [ 11314 ]
Andy Jefferson added a comment - 23/Nov/10 11:09 AM
Since you say you're using GAE/J then you're using DN 1.1 (you didn't put a "Affected Version" on the report). This version hasn't been supported for more than a year. I ran your test with current codebase (against RDBMS) and I have no issue with version updating.

Refer to http://datanucleus.blogspot.com/2010/01/gaej-and-jdojpa.html for GAE/J and our position.

Andy Jefferson made changes - 23/Nov/10 11:09 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Cannot Reproduce [ 5 ]
Andy Jefferson added a comment - 23/Nov/10 11:32 AM

Andy Jefferson made changes - 08/Dec/10 03:28 PM
Status Resolved [ 5 ] Closed [ 6 ]