The TYPE_ID column in my table is a primary key, so it will not allow two records with their TYPE_ID = 0 to be inserted , I guess one record is being inserted and then rolled back. If I attempt to insert only one record, it is being inserted fine and the auto increment gives correct value to TYPE_ID (not 0)
When I add the @GenerateValue on the ID field, I get the following exception and the records are not being inserted.
Looks like it looks for some SEQUENCE table ???
[TopLink Fine]: 2008.02.02 05:16:22.062--ClientSession(11644607)--Connection(18871350)--Thread(Thread[main,5,main])--UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
bind => [50, SEQ_GEN]
[TopLink Warning]: 2008.02.02 05:16:22.156--ClientSession(11644607)--Thread(Thread[main,5,main])--Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b19-fcs (01/30/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'realestate.sequence' doesn't exist
Error Code: 1146
Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
bind => [50, SEQ_GEN]
Query: DataModifyQuery()
at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311)
...
Jon
[Message sent by forum member 'israyon' (israyon)]
http://forums.java.net/jive/thread.jspa?messageID=257153