users@glassfish.java.net

Re: JPA sequences making up weird numbers when migrating to GlassFish 2.1

From: <glassfish_at_javadesktop.org>
Date: Thu, 21 May 2009 07:04:49 PDT

Originally most platforms supported either Sequence (Oracle) or Identity (SyBase, SQLServer, DB2) - that's why TopLinkEssentials used to support either Sequence or Identity for a database platform.

Now some db platforms support both Identity and Sequence (like PostgreSQL) and TopLinkEssentials now supports that, too: you can still define some tables with SERIAL - and use Identity with them; now you can define some tables without SERIAL and use them with PostgreSQL sequences, taking advantage of preallocation of seq. values.

People can still switch between platforms that support only SEQUENCE (like Oracle) and only IDENTITY (like SyBase) without having to alter their code - nothing changed there.

However people no longer can expect the same results from SEQUENCE and IDENTITY on database platform that supports both.
[Message sent by forum member 'ailitche' (ailitche)]

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