Damir Bijuklic <damirbijukli..ahoo.com> wrote:
> Would implementing these be as simple as replacing
> appropriate portions of PostgresPkGenerator and moving
> it into FirebirdPkGenerator ?
Yes, it looks very similar to how the Oracle (and I assume
PostgresPKGenerator) works.
Once you implement it, be sure to post your patches to a JIRA issue, and
it'll get integrated into Cayenne.
> What is the behaviour of cayenne if i already have
> created generators (in the database) from other
> portions of system, how do i supply new initial value
> for non existing generators (ones which cayenne will
> create)?
The next available pk information is simply data in your database (either
method), so Cayenne doesn't care. It's something you need to set up
externally to cayenne.
When you create your Firebird sequences, you need to manually initialize
your sequences with your current sequence generator's highest values.
You could probably cheat (as long as the app isn't running), and populate it
with the highest pk value in your table, or you can grab it out of your
current sequence generator.
set generator gen_name to (select max(myPK)+1 from myTable)
-Mike
This archive was generated by hypermail 2.0.0 : Wed Mar 23 2005 - 19:34:53 EST