Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
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:19 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
|