I have two classes: User and Video:
@Entity
class User{
@Id
int id;
String name;
}
@Entity
class Video{
@Id
int id;
String url;
User user;
}
When i use this I get the following error:
Could not determine type for: User, at table: Video
I’m using Hibernate through Tapestry. Any suggestions?
Very simple: You need a
@ManyToOneannotation on theuserfield:See the Javadoc for more information.