Thanks a lot for your help. Yes, I only put that as a last resort. Because any other way that i tried didn't work.
Cheers, Abangkis On Sat, Nov 15, 2008 at 7:50 PM, Thiago H. de Paula Figueiredo <[EMAIL PROTECTED]> wrote: > Em Sat, 15 Nov 2008 07:47:53 -0300, abangkis <[EMAIL PROTECTED]> escreveu: > >> @Entity >> public class TaskItem { >> @Id >> @GeneratedValue(strategy = GenerationType.IDENTITY) >> @NonVisual >> private Long id; >> private User user; >> public Long getId() { >> return id; >> } >> @ManyToOne(targetEntity=User.class) >> @JoinColumn(name="USER_ID") >> public User getUser() { >> return user; >> } >> } > > Your problem is not related to Tapestry, just to Hibernate. > > You must choose: you put the mapping annotations in the fields (x)or your > put the annotations in the getters. You cannot mix them. I suggest you to > always put them in the getters. By the way, you don't need to use the > targetEntity field of @ManyToOne in your example. > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]