[jboss-user] [JBoss Seam] - Re: getting the id of the object inserted...
dustismo
do-not-reply at jboss.com
Mon Oct 22 12:13:41 EDT 2007
Make sure you use a GeneratedValue annotation in your model.
I.e.
| @Id
| @Column(name = "id", unique = true, nullable = false)
| @GeneratedValue(strategy = GenerationType.IDENTITY)
| @NotNull
| public long getId() {
| return this.id;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097555#4097555
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097555
More information about the jboss-user
mailing list