I\'ve got what I think is a simple question. I\'ve seen examples both ways. The question is - \"why can\'t I place my annotations on the field?\". Let me give you an exam
Does it work if you do the following:
@Entity @Table(name="widget") public class Widget { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Integer id; public Integer getId() { return this.id; } public Integer setId(Integer Id) { this.id = id;} }