openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Bauer <techhu...@gmail.com>
Subject Re: relation "mySequence" already exists
Date Tue, 08 Jun 2010 21:17:14 GMT
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 able to reproduce the problem now with PostgreSQL using your code
> snippet. For now, I think I should be able to get by without the original
> code.  Thanks so much for the offer, though.  If you could test the fix
> if/when it is ready, that would be a great.
>
> -Jeremy
>
>
> On Mon, Jun 7, 2010 at 1:51 PM, Christopher Schmidt <
> fakod666@googlemail.com> wrote:
>
>> Hi Jeremy, thx for your answer...
>>
>> If it helps I can push the sources and tests to Github (in a view days)?
>>
>> On Mon, Jun 7, 2010 at 8:33 PM, Jeremy Bauer <techhusky@gmail.com> wrote:
>> > Hi Christopher,
>> >
>> > . . .
>>
>
>

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