[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6783) Using FetchType.EAGER with @ElementCollection results in multiple entity copies returned via Criteria query
    Greg Burcher (JIRA) 
    noreply at atlassian.com
       
    Fri Oct 28 11:57:19 EDT 2011
    
    
  
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