db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andras Salamon <asala...@hu.inter.net>
Subject torque sql generator
Date Fri, 06 Feb 2004 19:43:10 GMT
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


Mime
View raw message