Using the Eclipse WTP's Dali support I quickly got an example working. You just need to add a strategy to your @GeneratedValue top indicate the use of the database's identity support:
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private int id;
Doug
[Message sent by forum member 'djclarke' (djclarke)]
http://forums.java.net/jive/thread.jspa?messageID=257172