[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7152) Can't use annotations to map nested Embeddables where the inner instance has a ManyToOne reference

Chris L (JIRA) noreply at atlassian.com
Tue Mar 6 14:13:48 EST 2012


Can't use annotations to map nested Embeddables where the inner instance has a ManyToOne reference
--------------------------------------------------------------------------------------------------

                 Key: HHH-7152
                 URL: https://hibernate.onjira.com/browse/HHH-7152
             Project: Hibernate ORM
          Issue Type: Bug
          Components: annotations
    Affects Versions: 3.5.5
         Environment: Hibernate 3.5.5, any database.
            Reporter: Chris L
         Attachments: NestedEmbeddableBug.zip

Using annotations, we set up an Entity containing an ElementCollection, whose elements themselves contain an Embeddable, which has a ManyToOne reference to another Entity.  When we use this set up to build the SessionFactory, it fails with an ArrayIndexOutOfBoundsException in the AbstractCollectionPersister.

Exception is below, source code files are attached: Run View.main() to reproduce the issue.

{{Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
   at org.hibernate.persister.collection.AbstractCollectionPersister.initCollectionPropertyMap(AbstractCollectionPersister.java:1736)
   at org.hibernate.persister.collection.AbstractCollectionPersister.initCollectionPropertyMap(AbstractCollectionPersister.java:1712)
   at org.hibernate.persister.collection.AbstractCollectionPersister.<init>(AbstractCollectionPersister.java:600)
   at org.hibernate.persister.collection.BasicCollectionPersister.<init>(BasicCollectionPersister.java:74)
   at org.hibernate.persister.PersisterFactory.createCollectionPersister(PersisterFactory.java:104)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:318)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
   at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
   at com.rtrms.hibernate.View.main(View.java:46)}}

--
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