Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
...
cmp30.tables.flights.pk-generator-type=NONE
...
cmp30.tables.persons.pk-generator-type=AUTO

If you look at the vm template, you'll see it's not the most robust
solution. I'll try to get a proper version up, with GUI settings
and checking on the legal values.

But feel free to commit your own work. Would be cool if we could get out a
proper version of the plugin with support for all major configuration
options soon :)

.eivind
Hi Eivind, Wouter,
I originally thought the same thing Wouter as far as the AUTO only being
an Integer or a Long, however that is not always the case. I do have
one test application that uses the 'GUID' pattern where the
auto-generated (although application-supplied in this scenario) key is
actually a String. GUID is something like the server name, the time,
and the network address hashed together in a 32-bit char, can't remember
exactly, but is a use-case for GENERATOR-type that is a String.
Having said that, the GUID pattern is probably a new GENERATOR type not
yet defined and does not match the definitions provided for these types
http://www.caucho.com/resin-3.0/ejb3/cmp-table.xtp
* NONE - no auto generation for this field
* IDENTITY - the database supplies the new key, e.g. auto_increment,
SERIAL, or IDENTITY
* SEQUENCE - use a SEQUENCE type to generate the key
* AUTO - choose the generator based on the database
o MySQL - IDENTITY using auto_increment
o Resin - IDENTITY using auto_increment
o Postgres - SEQUENCE
o Oracle - SEQUENCE
So, from a more educated standpoint, AUTO is designed to be underneath
only IDENTITY/SEQUENCE, so yes, AUTO *should* only work if the field is
an Integer/Long (unless SEQUENCE can also handle others).
Regardless, is there something I can put in the preference file to set
the per-table generator to NONE? If not, I'll start poking around to
figure it out and commit it back.
-D
Hey,
I'll be adding functionality to choose generator type for
each table.
Loading...