Hassan Abolhassani wrote:
>In the previous mail subject was not appropriate, I resend with more
>appropriate subject. Sorry for any inconvenience.
>
>Hi,
>
>When I try to insert a row in a table with autoincrement id I get the
>following exception:
>
>org.apache.torque.TorqueException: IdGenerator for table 'HOSPITAL' is null
>
>It was working before in mysql but when I moved to postgresql it is not
>working anymore.
>
>I have following definition in schema for table hospital:
><column name="ID" required="true" autoIncrement="true" primaryKey="true"
>type="INTEGER" />
>
>and in postgresql there are two sequences cretared by ant task:
>
>hospital_id_seq, and hospital_seq
>
>
The following is cut directly from a message I sent to this very list
only yesterday:
> For PostgreSQL I recommend that you specify include:
>
> <id-method-parameter name="seqName"
> value="addr_groups_addr_group_id_seq"/>
In your case this would be: hospital_hospital_id_seq
>
> within your table element.
>
> You should also be sure to check out:
>
> 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]