db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Datastore identity strategy
Date Tue, 28 Mar 2006 06:30:09 GMT
Hi Craig,

I don't read the spec (as it currently is) to allow identity to utilise
sequences. You have a sequence option for that.

> <proposed>
> •The value “sequence” specifies that a named database sequence is  
> used to generate key values for the table. If sequence is used, then  
> the sequence attribute is required. The JDO implementation uses the  
> named sequence in insert statements for the table.
> •The value “identity” specifies that the column identified as the key  
> column is managed by the database as an identity type, regardless of  
> how the database generates the values, e.g. using the SQL 2003  
> IDENTITY column type or using triggers and stored procedures with a  
> sequence. The JDO implementation does not provide primary key values  
> for the table.
> </proposed>

So if you have strategy="identity" to include sequences what is the "sequence
name" in a datastore that utilises sequences ? Are we saying that the "sequence"
attribute name is used again with strategy="identity" in that case ?

> I'm also trying to figure out if we need the following:
> <spec>
> •The value “autoassign” specifies that the column identified as the  
> key column
> is managed by the database to automatically increment key values.
> </spec>

So how do you specify MySQL "autoincrement" if you remove this ? They aren't
"IDENTITY" type.

We have (at least) 4 types of assigning ids directly in RDBMS ... sequence,
autoincrement, identity, serial. All need to be included in any change. 



Clearly this also applies to "value-strategy" and not just to "strategy" within
datastore-identity.

--
Andy

Mime
View raw message