Primary Key in INSERTs

Hi!! :-)

Im currently trying to access some Postgres-database from an Enterprise-App running inside Sun App Server 9... Some of th tables have a primary-key-field with type SERIAL, so Postgres creates the value for those fields!!

Now: How can i achieve, that the app-server does not try to write into those fields?

Specifying insertable=false is ignored and when i specify insertable=false and updatable=false i get the following error on deployment:

Deploying application in domain failed; Exception [TOPLINK-0] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.IntegrityException Descriptor Exceptions: Exception [TOPLINK-46] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.DescriptorException Exception Description: There should be one non-read-only mapping defined for the primary key field [dsl_payments.id]. Descriptor: RelationalDescriptor(de.meitnerweg.netzag.dsl.persistence.DslPayment --> [DatabaseTable(dsl_payments)]) Runtime Exceptions: Exception [TOPLINK-0] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.IntegrityException Descriptor Exceptions: Exception [TOPLINK-46] (Oracle TopLink Essentials - 2006.4 (Build 060412)): oracle.toplink.essentials.exceptions.DescriptorException Exception Description: There should be one non-read-only mapping defined for the primary key field [dsl_payments.id]. Descriptor: RelationalDescriptor(de.meitnerweg.netzag.dsl.persistence.DslPayment --> [DatabaseTable(dsl_payments)]) Runtime Exceptions:

Anyone ideas?

:-)

[1640 byte] By [aj.sommer] at [2007-11-26 9:26:59]
# 1
The blog here describes how to work with this situation. http://blogs.sun.com/Glassfish_PostgreSQL/entry/introducing_support_for_postgre sql_inLook into known Issues / Workaround sections.
miteshm at 2007-7-7 0:06:20 > top of Java-index,Application & Integration Servers,Application Servers...