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: Graham Stewart
Votes: 0
Watchers: 1

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

setSerializeRead not examined when using compiled query

Created: 10/Jan/13 04:11 PM   Updated: 19/Jan/13 09:19 AM   Resolved: 11/Jan/13 07:53 PM
Component/s: Queries
Affects Version/s: 3.2.0.m2
Fix Version/s: 3.2.0.m3

File Attachments: 1. File serialize.diff (1 kB)

Environment: Linux on on mysql

Forum Thread URL:,7406
Datastore: MySQL
Severity: Development

 Description  « Hide
Setting setSerializeRead to either true or false is ignored once a query is compiled. The existing compilation is used without inspecting the setSerializeRead value.

I have attached a testcase in the forum post.

Sort Order: Ascending order - Click to sort in descending order
Graham Stewart added a comment - 11/Jan/13 04:53 PM
This patch sorts the issue.

Andy Jefferson added a comment - 11/Jan/13 07:53 PM
Thx for the patch.
Adding a check to setSerializeRead makes sense, now in SVN trunk.
Updating the output from a method that returns the JDOQL query string does not; the toString() of a JDOQLQuery (and JPQLQuery) presents the equivalent single-string query, and "FOR UPDATE" is not part of the JDO spec (and means nothing to non-RDBMS datastores). SVN trunk adds this to the queryCacheKey for RDBMS only. It also applies the same for JPQL (since such a situation would happen there just the same).