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]

Reply via email to