users@glassfish.java.net

Re: Inserting records into MySql using TopLink essentials ORM

From: <glassfish_at_javadesktop.org>
Date: Sat, 02 Feb 2008 12:29:31 PST

I assume if you look at the SQL you will see two rows being inserted with their TYPE_ID = 0. You mentioned that the ID field is auto increment yet you have not configured in your entity how the ID is assigned.

I would assume you need @GenerateValue on the ID field of the type indicating how the ID should be assigned.

Doug
[Message sent by forum member 'djclarke' (djclarke)]

http://forums.java.net/jive/thread.jspa?messageID=257146