I have used @GeneratedValue(strategy = GenerationType.IDENTITY) but it throws 'id' not defined exception while inserting data. I have chaged mysql table structure manually by adding "AUTO_INCREMENT" property and it's working fine without specifying any ID generation strategy.
Looks like IDENTITY does not store max current ID in a table, as does the SEQUENCE. However, just wondering what is the best way of using IDENTITY. How can I set initial ID if I use IDENTITY.
cheers.
[Message sent by forum member 'server_user' (server_user)]
http://forums.java.net/jive/thread.jspa?messageID=244444