[hibernate-issues] [Hibernate-JIRA] Commented: (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
Wed Mar 7 09:48:48 EST 2012
[ https://hibernate.onjira.com/browse/HHH-7152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45856#comment-45856 ]
Chris L commented on HHH-7152:
------------------------------
I just tried this in 4.1.0, and it still breaks with the same underlying exception.
> 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