[jboss-user] [EJB 3.0] - mapping example onetoMany
trashhash
do-not-reply at jboss.com
Sun Jan 14 11:04:33 EST 2007
Dose any one got an easy example for mapping tables/objects? This is what Im manage to do so far.
|
| public class Team (...)
| @OneToMany(mappedBy="team")
| private List teamList;
|
| public class User (...)
|
| @ManyToOne
| @JoinColumn(name="team_id",referencedColumnName="id")
| protected User user;
|
|
referencedColumnName="id" id column for table user.
name = id column for table team.
All im getting is
| javax.persistence.PersistenceException: org.hibernate.MappingException: Could not determine type for: java.util.List, for columns: [org.hibernate.mapping.Column(user)]
|
Its strange that Column contains the class name?
Do I need to add something to persistence.xml?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001518#4001518
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001518
More information about the jboss-user
mailing list