  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | - ManyToOne OneToMany | - ManyToOne OneToMany 2007-08-08 - By jknotzke
Back
Hi,
I am using the CVS trunk and I cannot get a ManyToOne relationship working. I get the following error when deploying:
| org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: com.techsolcom.powermanager.Workout.workout in com.techsolcom .powermanager.Athlete.workouts |
My Code looks like this: Athlete.java
| @(protected)(mappedBy="workout", cascade=CascadeType.REMOVE) | private List<Workout> workouts = new ArrayList<Workout>(); | | public List<Workout> getWorkouts() | { | return workouts; | } | | public void setWorkouts(List<Workout> workouts) | { | this.workouts = workouts; | } | |
..and Workout.java looks like this
| @(protected) | @(protected) | private Athlete athlete; | | public Workout(Athlete athlete) | { | this.athlete = athlete; | } | | | | | Any ideas ? I noticed in some of the examples, like the ContactList example that there are entries in components.xml.. No idea if that's the problem. Thanks | | | |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4072209#4072209
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4072209 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|
 |