The following issue has been updated:
Updater: Anders Bengtsson (mailto:ndr...@ya...)
Date: Mon, 28 Jul 2003 11:21 AM
Comment:
A JUnit test reproducing the problem.
'testQuery' passes while 'testCriteria' fails.
Changes:
Attachment changed to criteriabug.tar.gz
---------------------------------------------------------------------
For a full history of the issue, see:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-217&page=history
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-217
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-217
Summary: Criteria ignores discriminator, instantiates with wrong class
Type: Bug
Status: Unassigned
Priority: Major
Project: Hibernate2
Versions:
2.0.2
Assignee:
Reporter: Anders Bengtsson
Created: Mon, 28 Jul 2003 11:19 AM
Updated: Mon, 28 Jul 2003 11:21 AM
Description:
When searching in a subclass with a Criteria, *all* rows in the table are returned, not only those belonging to the subclass.
Example: Base class A, with subclasses B and C. Using session.createSearch(B.class).list() will incorrectly return all rows of both B and C, all of them instantiated as B's.
Searching for A works, both B's and C's get instantiated the right way. It is only when searching for a subclass it seems to ignore the discriminator field.
The corresponding search with session.createQuery("from B") works correctly too.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|