[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-615) Inherited relationships not found in collections of subclasses of the entity containing the relationship
Michael Newcomb (JIRA)
noreply at atlassian.com
Thu Aug 2 11:59:11 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27706 ]
Michael Newcomb commented on ANN-615:
-------------------------------------
Emmanuel,
Thanks for your reply. Upon further consideration I think this would be a useful feature and went to try and find the discussions you mentioned in JIRA or the forums, but I could not find anything with mappedBy and inherit.
I would appreciate any additional help on the search language that I could use to find them...
Thanks,
Michael
> Inherited relationships not found in collections of subclasses of the entity containing the relationship
> --------------------------------------------------------------------------------------------------------
>
> Key: ANN-615
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-615
> Project: Hibernate Annotations
> Issue Type: Bug
> Components: binder
> Reporter: Michael Newcomb
>
> Consider:
> @Entity
> public class A
> {
> @Id
> @GeneratedValue
> protected int id;
> @OneToMany(mappedBy = "a")
> protected Collection<C> c;
> }
> @Entity
> public abstract class B
> {
> @Id
> @GeneratedValue
> protected int id;
> @ManyToOne
> protected A a;
> }
> @Entity
> public class C
> extends B
> {
> }
> Gives the following errors upon deployment:
> Caused by: org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: com.gd.iewtpt.isi.C.a in com.gd.iewtpt.isi.A.c
> at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:552)
> at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:517)
> at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
> at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
> at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:316)
> at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
> at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1269)
> at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150)
> at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:888)
> at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186)
> at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:246)
> ... 7 more
> I can get around this issue, but it seems there is a bug here...
--
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