Use of sequences with EclipseLink (native) and Postgres [message #868585] |
Wed, 02 May 2012 05:03  |
Eclipse User |
|
|
|
hi,
i have some troubles on use of eclipseLink native (without JPA) on a postgre DB.
EclipseLink use by default a sequence name SEQUENCE. But with postgres, eclipseLink failed tu used it because this term is reserved and must be between quotes to be used correctly.
I try to specify in persistance.xml an another name :
<class-mapping-descriptor xsi:type="relational-class-mapping-descriptor">
<class>fr.astek.persistance.eclipselink.model.Category</class>
<alias>Category</alias>
<primary-key>
<field table="category" name="categoryid" xsi:type="column" />
</primary-key>
<events />
<querying />
<attribute-mappings>
...
</attribute-mappings>
<descriptor-type>independent</descriptor-type>
<sequencing>
<sequence-name>table_sequence</sequence-name>
<sequence-field table="category" name="categoryid" />
</sequencing>
...
</class-mapping-descriptor>
But eclipseLink continue to call the first!
I try to specify my sequence in serverSession or unitOfWork programatically. Without any success.
I would like to use my own sequence, how i could do that?
Regards,
Olivier
|
|
|
|
Powered by
FUDForum. Page generated in 0.03336 seconds