0 Replies Latest reply on May 2, 2004 5:12 PM by Jonathan Chen

    Changes to the autoincrement template.

    Jonathan Chen Newbie


      I would like to propose a change to the <auto-increment-template> in the jbosscmp.xml file. At the moment, it only has one replacement-value "?1" which expands to the "column-name column-type null-clause". I suggest that it would be better to split this up to 3 replacement-values: "?1", "?2", "?3" being the colum-name, column-type and null-clause respectively.

      This would allow users a greater flexibility in defining the create-column syntax for auto-incrementing fields. In particular this would solve the problem for databases having a "serial" datatype (eg: PostgreSQL and Informix), where using a data-type of "serial" is a real no-no with XDoclet. The auto-increment template in their case would be <auto-increment-template>?1 serial</<auto-increment-template>; compared to those systems with the `identity' keyword where the template would be <auto-increment-template>?1 ?2 ?3 identity</<auto-increment-template>.