[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-390) Property pointed to by "mappedBy" not found if defined in superclass of class referenced by "targetType"

Adrian Sampaleanu (JIRA) noreply at atlassian.com
Mon Aug 28 15:01:24 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-390?page=comments#action_24168 ] 

Adrian Sampaleanu commented on ANN-390:
---------------------------------------


Our situation is 3, and I see your point - the bi-directional mapping we had was not correct from that point of view so Hibernate's message was accurate, although it might be worded a bit more clearly to indicate that it wasn't found in the targetEntity (in our case that was DeploymentTaskImpl).

Thanks

> Property pointed to by "mappedBy" not found if defined in superclass of class referenced by "targetType"
> --------------------------------------------------------------------------------------------------------
>
>          Key: ANN-390
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-390
>      Project: Hibernate Annotations
>         Type: Bug

>  Environment: Windows XP SP2, Eclipse 3.2 final, WTP 1.5 final
> HibernateTools-3.2.0.200607060659-nightly.zip with relevant jars in org.hibernate.eclipse_3.2.0.200607060659-nightly plugin replaced with same date jars built from SVN. Removed WTP plugins from Hibernate Tools dist since I already had them loaded.
> I realize that this does not exactly match the build drivers for the nightly I'm using, but I don't think this is the issue here.
>     Reporter: Adrian Sampaleanu

>
>
> When trying to open session factory in the Hibernate Console, I get:
> org.hibernate.AnnotationException: mappedBy reference an unknown property: com.tirawireless.jump.jdm.model.task.DeploymentTaskImpl.deploymentPlan in com.tirawireless.jump.jdm.model.plan.DeploymentPlanImpl.deploymentTasks
> 	at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:503)
> .....
> The relevant property and annotation is as follows:
>     @OneToMany(targetEntity = DeploymentTaskImpl.class, mappedBy = "deploymentPlan", fetch = FetchType.LAZY)
>     @OrderBy(clause = "name ASC")
>     @Cascade({CascadeType.SAVE_UPDATE})
>     public Set<DeploymentTask> getDeploymentTasks()
> The "deploymentPlan" property is _not_ defined in DeploymentTaskImpl, but is defined in it's superclass. I would think that it should be visible when establishing the mapping above.
> Have not found this issue addressed in either the forums or JIRA.

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