Search Postgresql Archives

Re: Problems with sequences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alban Hertroys [mailto:alban@xxxxxxxxxxxxxxxxx]
>Arturo Perez wrote:
>> In any case, at this point in time it's looking like Cayenne doesn't honor
>> the rules of the sequence.  It appears to (and is documented as) internally
>> incrementing rather than fetching the sequence for each insert.
>
>I have no experience with Cayenne, but reading 
>http://cwiki.apache.org/CAYDOC/primary-key-generation.html it seems 
>possible to use database sequences instead of Cayenne-generated ones:
>
>"... Generation mechanism depends on the DbAdapter used and can be 
>customized by users by subclassing one of the included adapters."
>


Yes.  I think I am being bitten by a desire to minimize changes required when migrating
from MySQL to PostgreSQL.  Contrary to my belief, it appears that the pgSQL
schema creation script was not created by Cayenne configured to work with pgSQL but
rather was based on the script Cayenne used to create the MySQL database.  Looks like I will
be uncovering nits as we go for a bit yet.

I did modify the sequences to increment by 20 as required by Cayenne.  Hopefully,
this particular issue will be laid to rest by that.

thanks all,

-arturo


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux