]
Steve Ebersole updated HHH-5561:
--------------------------------
Reporter: Konstantin Ignatyev (was: Konstantin Ignatyev)
criteria query returns wrong number of objects for one-to-many
relationships, multiplied by number of associated instances
--------------------------------------------------------------------------------------------------------------------------
Key: HHH-5561
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5561
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.5
Environment: Hibernate 3.5.5 ORACLE and HSQL databases
Reporter: Konstantin Ignatyev
Attachments: hibernate-criteria-reprocase.tgz
For this mapping to subclassed objects (Links)
Container_class
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
@IndexColumn(base=1, name="item_position")
@JoinColumn(name="cnt_id", nullable=false)
@ForeignKey(name="cnt_inlk_fk")
public List<AbstractLink> getLinks() {
return links;
}
When only one object is created with 3 links, and then DB is queried via Criteria
cList = s.createCriteria(Container.class).list();
the result contains 3 objects, should be one.
Please see attached reprocase
mvn test
should do if repositories are set correctly
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: