[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5561) criteria query returns wrong number of objects for one-to-many relationships, multiplied by number of associated instances
Gail Badner (JIRA)
noreply at atlassian.com
Mon Sep 20 18:16:23 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38464#action_38464 ]
Gail Badner commented on HHH-5561:
----------------------------------
I'm not able to run your test case.
Please do the following:
* checkout the trunk version http://anonsvn.jboss.org/repos/hibernate/core/trunk
* update a test in testsuite/src/test/java/org/hibernate/test/criteria to reproduce your issue
* create a patch using "svn diff" and attach to this issue
Thanks,
Gail
> 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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list