openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schmidt <fakod...@googlemail.com>
Subject Re: relation "mySequence" already exists
Date Wed, 09 Jun 2010 04:38:04 GMT
Jersey,

You are right. I changed the sequenceName to xxx and it works...

Thx for help :)

Am 08.06.2010 23:17 schrieb "Jeremy Bauer" <techhusky@gmail.com>:

Hi Christopher,

As it turns out, I don't think this problem is the same as OPENJPA-1259.
There is special code in the PostgresDictionary that treats sequences
suffixed with "_SEQ" as system managed sequences.  The comment in
PostgresDictionary.isSystemSequence reads:

       // filter out generated sequences used for bigserial cols, which are
       // of the form <table>_<col>_seq

This explains why the same code worked for me on DB2.  Are you able to
modify the sequence name?  (ex. sequenceName = "seq_obj_item_id")  If not,
please file a new JIRA.   It may/should be possible to make the code a bit
smarter by actually verifying _seq suffixed sequences are for a bigserial
column[1] instead of just making the assumption.

-Jeremy

[1]
http://www.postgresql.org/docs/8.4/static/datatype-numeric.html#DATATYPE-SERIAL


On Mon, Jun 7, 2010 at 2:39 PM, Jeremy Bauer <techhusky@gmail.com> wrote:

> Christopher,
>
> I am ...

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message