openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mehmet Akif Olcay (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-582) when updating postgresql sequences last generated key query does not account for schema
Date Fri, 25 Apr 2008 21:35:55 GMT
when updating postgresql sequences last generated key query does not account for schema
---------------------------------------------------------------------------------------

                 Key: OPENJPA-582
                 URL: https://issues.apache.org/jira/browse/OPENJPA-582
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 1.0.1
         Environment: postgresql 8.1.11, debian
            Reporter: Mehmet Akif Olcay
            Priority: Minor


In persistence.xml, a schema is defined for persistence unit with

<property name="openjpa.jdbc.Schema" value="hukuk" />

when an insertion occurs postgresql complains as

database problem - HATA: "dava_id_seq" nesnesi mevcut de─čil {prepstmnt 22074838 SELECT CURRVAL('Dava_id_SEQ')}
[code=0, state=42P01]

in turkish meaning that: there is no dava_id_seq object,

which was a sequence under the hukuk schema

The schema defined in persistence.xml is not used for sequence names.

Workaround:
create an entry in persistence.xml as

<property name="openjpa.jdbc.DBDictionary" value="postgres(LastGeneratedKeyQuery=SELECT
CURRVAL(''{1}_{0}_SEQ''))" />

I think, there must be a correction in DBDictionary of postgresql.





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message