[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6783) Using FetchType.EAGER with @ElementCollection results in multiple entity copies returned via Criteria query

Christian Bauer (JIRA) noreply at atlassian.com
Fri Oct 28 12:09:22 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44196#comment-44196 ] 

Christian Bauer commented on HHH-6783:
--------------------------------------

Not a bug.

http://community.jboss.org/wiki/HibernateFAQ-AdvancedProblems#Hibernate_does_not_return_distinct_results_for_a_query_with_outer_join_fetching_enabled_for_a_collection_even_if_I_use_the_distinct_keyword

> Using FetchType.EAGER with @ElementCollection results in multiple entity copies returned via Criteria query
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-6783
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6783
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: annotations
>    Affects Versions: 3.6.0
>         Environment: MySQL
>            Reporter: Greg Burcher
>
> If we specify FetchType.EAGER on an @ElementCollection:
>     @ElementCollection(fetch = FetchType.EAGER)
>     @Column(name = "emailAddress")
>     private Set<String> emailAddresses;
> then request all persisted objects of this class via Criteria:
>     session.createCriteria(ReportSchedule.class).list();
> The returned list contains multiple references to each ReportSchedule, one per email address.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list