users@glassfish.java.net

Re: TopLink-Essentials and "parent key not found'

From: <glassfish_at_javadesktop.org>
Date: Mon, 23 Jul 2007 00:07:23 PDT

To my knowledge, SEQUENCE and IDENTITY are database specific solutions and it really depends on your database. In my case, SEQUENCE works because we are using Oracle which does support SEQUENCE to generate keys. I just simply defined the required sequences in ORACLE and then in my annotations referred to them.
As far as I know, MS-SQLServer uses IDENTITY approach to generate keys. So if you are using SQLServer, then IDENTITY would be an option for you (I have never used it with JPA)
[Message sent by forum member 'mohammadwrk' (mohammadwrk)]

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