dev@glassfish.java.net

Re: Default Table name for Table Generator

From: Andrei Ilitchev <andrei.ilitchev_at_oracle.com>
Date: Mon, 18 Jun 2007 15:37:31 -0400

In case pkColumnValue is not specified in the generator - generator name is used.
So, if it's AUTO strategy and SEQ_GEN is not explicitly defined by the user, then
pkColumnValue=="SEQ_GEN";
if it's TABLE strategy and SEQ_GEN_TABLE is not explicitly defined by the user, then
pkColumnValue=="SEQ_GEN_TABLE";

----- Original Message -----
From: "Markus KARG" <markus.karg_at_gmx.net>
To: <dev_at_glassfish.dev.java.net>
Sent: Monday, June 18, 2007 3:29 PM
Subject: Re: Default Table name for Table Generator


> Marina Vatkina schrieb:
>> These are the rules that should be published in the next (9.1) dev guide:
>>
>> @GeneratedValue defaults are as follows:
>>
>> * Using strategy=AUTO (or no strategy) creates a @TableGenerator
>> named SEQ_GEN with default settings. Specifying a generator has no
>> effect.
>>
>> @TableGenerator defaults are as follows:
>>
>> * The default table is SEQUENCE.
>> * The default pkColumnName is SEQ_NAME.
>> * The default valueColumnName is SEQ_COUNT.
>> * The default pkColumnValue is the specified name.
> ^^^^^
> So this means, in case of strategy=TABLE and no name= is specified, the
> pkColumnValue used is which name?
>
> And in case of strategy=AUTO and no name= is specified, what is the
> actual pkColumnValue used?
>
> Thanks
> Markus
>
> --
> http://www.xing.com/go/invita/58469
>
>