users@glassfish.java.net

Re: Inserting records into MySql using TopLink essentials ORM

From: <glassfish_at_javadesktop.org>
Date: Sun, 03 Feb 2008 07:03:32 PST

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