users@glassfish.java.net

Re: seq_gen_sequence error with toplink 2.1b23

From: <glassfish_at_javadesktop.org>
Date: Mon, 10 Mar 2008 01:45:39 PST

Hi again.

I switched from SEQUENCE to IDENTITY and now it seems to work. Native Postgresql SEQUENCES are created like before now. That means (as you said before), that in earlier days SEQUENCE was mapped to IDENTITY for postgresql. Didn't know that postgresql supports auto generation of IDs on INSERT like mysql does. Although I don't really like that auto thing, I will stick with it. Tried to use SEQUENCE but then no sequence per table is automatically created. I think one has to specify

@SequenceGenerator(name="InvSeq",sequenceName="INV_SEQ", allocationSize=5)

for each id attribute separately - no sensible auto-generation (sequence names) like with IDENTITY :(.

Thanks anyway.
[Message sent by forum member 'vguna' (vguna)]

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