Hi!
        Thanks for your reply!

> > Is there any way to have incremental primary keys without the
> > explicit usage of sequences? If yes, how?
>
> What do you mean by implicit use of sequences?
Is it possible to have an incremental primary key without the usage of
sequences?

Which is the better way to have a incremental primary key?

1)
* @jboss.entity-command
*        name="pk-sql"
* @jboss.entity-command-attribute
*        name="pk-sql"
*        value="SELECT nextval('TEST_SEQ')"

2) Which I can't get working..
* @jboss:entity-command
 *          name="postgresql-fetch-seq"
 *
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand"
 * @jboss:entity-command-attribute
 *          name="sequence"
 *          value="TEST_SEQ"

3) Any other......



> > What can I win with a unknown-pk declaration?
> There is a paragraph in the spec about it called Special case Unknown
> primary keys.
I have seen the spec, and for now I don't need the unknown-pk :-)



> > Is there any way to automatically create the sequences if
> > they don't still exist (something like: @jboss:create-table
> > create="true")?
>
> At the moment, JBoss does not create sequences even if it is setup to
> create tables. As a workaround, I think, you could use something like
> @jboss.persistence post-table-create="CREATE SEQUENCE %%t_seq START WITH
> 1 INCREMENT BY 1"
Unfortunately the jboss.persistence tag doesn't seems to be working....


        Regards and thanks,
                Victor Batista





-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to