Issue Details (XML | Word | Printable)

Key: NUCMONGODB-128
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Marcin Jurkowski
Votes: 0
Watchers: 0
Operations

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

Invalid version column name when selecting fields for query result candidates when using version field in class

Created: 14/Nov/13 11:09 PM   Updated: 19/Nov/13 10:29 AM   Resolved: 15/Nov/13 08:53 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.2.5

File Attachments: 1. Text File Fix-query-candidates-invalid-version-column-name.patch (2 kB)


Datastore: MongoDB


 Description  « Hide
When query result candidates are collected for a class that has JDO versioning enabled and the version is stored in a field of the class, an invalid column name ('VERSION') is added to MongoDB object field selection list.

This bug occurs only when the version number is stored in a field of the class using DataNucleus extension and does not occur when using a surrogate column. Because the version field belongs to the default fetch group and thus, in most cases is retrieved anyway, the problem won't manifest in a typical use case. The only symptom will be a log message of DN trying to fetch unnecessary field 'VERSION' from MongoDB.

A patch with proposed solution, duplicating the version column name selection logic from MongoDBUtils class is attached. I can provide also a testcase if it's necessary.

Sort Order: Ascending order - Click to sort in descending order
Marcin Jurkowski added a comment - 14/Nov/13 11:18 PM
A patch with proposed fix

Andy Jefferson added a comment - 15/Nov/13 08:53 AM
SVN trunk has this now. Thx