Isn't it rather risky using MAX to obtain the next primary key, as
there could be multiple threads creating new entities, and two or more
of them could obtain the same value for MAX and attempt to use the same
primary key? The best way I'm aware of is to use a DB sequence, but
this involves proprietary SQL. I'd be interested in any better
suggestions too.

Luke.


-- 
 Luke Taylor.
 PGP Key ID: 0x57E9523C


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to