geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Carew" <dcca...@gmail.com>
Subject Question about CMP Entity Bean key generation
Date Wed, 22 Feb 2006 19:19:33 GMT
I'm trying to do this in DB2 . I found an example of a deployment plan in
Aaron Mulder's book but I don't recognize  this particular SQL dialect.

<key-generator> <sql-generator> <sql>select nextval('person_seq')</sql>
<return-type>java.lang.Integer</return-type> </sql-generator>


Will the container use the contents of <sql> in the Values clause of an
INSERT statement like this

e.g. insert into foo values (contents of <sql>,....)

or will it execute the contents of <sql> as a separate statement and expect
it to return a single value of the appropriate type ? In DB2 this would be

 select (nextval for mysequence) from sysibm.sysdummy1

>From the example in the book I would guess the latter approach is what is
expected but I just wanted to verify this.

Mime
View raw message