>I think that when the native keygenerator is selected, and the database
>supports only sequences, hibernate should automatically use the sequence
>keygen. When I created the native keygen I thought native should be the
>name for all kinds of native generation.
>Correctly speaking we have an "identity" generator and a "sequence"
>generator, and both are "native" generators.
>I simply dont want to change my mapping file when I change database, and
>I think its more logical this way anyway. One other possible feature
>would be to specify a "fallback" keygen in hibernate.properties, which
>is used when native key-generation is specified, but the database doesnt
>support it.
yes, point taken.
The fact that we can't just switch platforms underneath is already a
problem for the test suite.
The issue I have here is that "identity" style key generation doesn't need
to specify a sequence name, whereas sequence style does. Should I just go
with the default sequence name ("hibernate_sequence" or something, I forget
what it is exactly)?
That way we can have all three styles: identity, sequence, native - where
native is a portable form as you suggest, and sequence is nonportable but
lets you specify a sequence name.
Anyone unhappy with that?
|