You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Andras Salamon <as...@hu.inter.net> on 2004/02/06 20:43:10 UTC

torque sql generator

Hi,

I'd like to use torque's sql generator for hsqldb (hypersonic) and
postgres databases. I'm using "native" id creation method.

Part of columns.vm for postgres:

    #if (($table.IdMethod == "native") && ($col.isPrimaryKey()))
      #set ( $default = "DEFAULT nextval('$table.SequenceName')" )

Part of columns.vm for hsqldb:

    #if ($col.isAutoIncrement() && $table.IdMethod == "native")
      #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") )

Postgres checks for primarity keyness of the column, hsqldb checks for
autoincrement flag. Why is the difference?

Thx,
Sala



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org