Hi Alan,
I wonder if our documentation is in sync with the code...  The default value
for openjpa.Sequence is table.  But, I believe we override that if certain
attributes within the Dictionary are set.  For example, sequenceSQL,
sequenceSchemaSQL, and sequenceNameSQL are attributes that get set by data
dictionaries that support Sequences natively.  For example, DB2 and Oracle
are two databases that support native sequences.  And, as long as the
GeneratedValue Strategy is set to SEQUENCE, I believe this kicks in without
having to set openjpa.Sequence to "native".

Since you are looking to create a new dictionary for Ingres, this would
explain why you have to set the openjpa.Sequence property to get the desired
effect.

Can you do any experimentation to verify this?  We may need to update our
documentation or javadoc to make this clearer.

Kevin

On Mon, Jul 27, 2009 at 11:36 AM, Alan Raison <[email protected]>wrote:

> Hi all
>
> I've been looking at the sequence support in DBDictionary and extending
> it for Ingres.  Ingres supports native sequences, but it seems that by
> default, OpenJPA prefers to use the OPENJPA_SEQUENCE_TABLE for internal
> sequence numbering.  Setting openjpa.Sequence=native changes this to use
> the native sequences.
>
> Is there a way/would it be desirable to set a preference for native
> sequences in the DB Dictionary?  I don't see this in any other
> dictionary, so I assume it's not desirable.  Perhaps this is so the
> schema is predictable?
>
> Thanks
>
> Alan
>

Reply via email to