db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc BEGUIGNEAU <marc_beguign...@yahoo.fr>
Subject Primary key problem using postgresql and torque
Date Thu, 03 Jul 2003 16:19:38 GMT
Hello everyone,

I use postgresql 7.2.1 and Torque 3.0.

I have an existing db called si, with 2 tables. My
tables contain some datas.

I have generate the model using Torque and when every
goes rigth (select, delete and update) except when i
want to insert new data in my table. I have this error
from Torque:

org.apache.torque.TorqueException: IdGenerator for
table 'film' is null.

I have search the mailing list and try all the
solution I have found but nothing go rigth, i have all
the time the same error.

This is a copy of my shema file:


<?xml version="1.0"?>

    <table name="film" idMethod="native">
        <column name="id_film" autoIncrement="true"
primaryKey="true" required="true" type="INTEGER"/>
        <column name="id_typefilm" required="true"
        <column name="titre" size="50" type="CHAR"/>
        <column name="nbr_exemplaire" type="INTEGER"/>
        <column name="date_achat" type="DATE"/>
        <foreign-key foreignTable="type_film">
            <reference foreign="id_typefilm"
    <table name="type_film" idMethod="native">
        <column name="id_typefilm"
autoIncrement="true" required="true" 
primaryKey="true" type="INTEGER"/>
        <column name="type_film" size="50"


Before using posgresql, i was using Oracle 9i and
everything worked. I was using, for Oracle, the
idMethod="none" because i haved seqences and triggers
to generate my ids.

I have test all solutions I have found, on this
mailing list and on the mail-archive.com. 

I really don't see who is the problem!

If somebody have an idea to solve my problem? And if
somebody is in the same case?

Thank a lot in advance.



Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran├žais !
Yahoo! Mail : http://fr.mail.yahoo.com

View raw message