E.Nebrat wrote:

could somebody help with defining postgres sequence using id-method-parameter? Is it possible? I'd like to use "native" id-method and to setup sequence initial value. Can I do this with id-method-parameter?

Assuming the sequence already exists, but you have loaded data into the table manually you would set the initial value in PostgreSQL itself using something like:
SELECT setval('tableName_columnName_seq', max(columnName)) FROM tableName;


Your schema needs to include definition of the correct sequence names as the last child element in the table element thus:
<id-method-parameter name="seqName" value="tableName_columnName_seq"/>


For further details see:
http://nagoya.apache.org/wiki/apachewiki.cgi?TorqueProjectPages/PostgreSQLFAQ


Scott

--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to