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: Improvement Improvement
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 Store RDBMS

RDBMSStoreManager.getClassNameForObjectID sometimes chooses UNION when discriminator defined!

Created: 02/Apr/10 10:32 AM   Updated: 26/Apr/10 03:38 PM   Resolved: 07/Apr/10 02:45 PM
Component/s: Queries
Affects Version/s: None
Fix Version/s: 2.1.0.m2

File Attachments: 1. Zip Archive (8 kB)

 Description  « Hide
If we have

Base (new-table)
AbstractSub (new-table) Sub2 (superclass-table)
Sub1 (superclass-table)

then when call pm.getObjectById for an id for the Base class this goes via a UNION query, even though Base has a discriminator defined!

It finds the correct class, but ought to use a simple discriminator query on the BASE table

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 07/Apr/10 02:45 PM
RDBMSStoreManager.getClassNameForObjectID has been rewritten in SVN trunk to handle this case (and all other cases tested by DN unit tests and JDO TCK)