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)

Key: NUCCORE-775
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

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

Reference fields (Object) are not categorised as relation fields, hence causing incorrect behaviour later

Created: 28/Oct/11 08:58 AM   Updated: 07/Nov/11 02:57 PM   Resolved: 28/Oct/11 09:36 AM
Component/s: Java Types, MetaData
Affects Version/s: 2.0.5, 2.1.4, 2.2.4, 3.0.2
Fix Version/s: 3.0.3

 Description  « Hide
When we process metadata for fields/properties we mark each member as a particular relation type. When the member is of type java.lang.Object this ought to mean that it is a relation (and use the "fieldType" for the related type), but we currently just mark as NONE. One consequence of this is that Object fields are L2 cached, but using the wrong mechanism, and should cache just the id of the related object not its value!

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 28/Oct/11 09:36 AM
SVN trunk fixes this

Chris Colman added a comment - 30/Oct/11 04:58 AM
Would one consequence of this issue have been that two instances of the same object might exist: One in the cache and another as an object that is referenced by an object in the cache or would the reference have always referred to the first cached instance?

Chris Colman added a comment - 01/Nov/11 10:17 PM
The initiator of this post:,6897_lastpage,yes#34956

said his issue was fixed by the latest snapshot that had this fix. Given he said he had L2 cache turned off this problem may have also affected the L1 cache so it is indeed a worthy fix!