Hi,

This was answered before:

http://archives.apache.org/eyebrowse/ReadMsg?listId=100&msgNo=198

BW,

Andras


----- Original Message -----
From: "Seth Milder" <[EMAIL PROTECTED]>
To: "torque" <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 6:06 PM
Subject: postgresql + torque + serial


> Hi,
>
> I am new to torque and I was just wondering if anyone has any idea how
> to get torque and postgresql to agree on what sequences get named by
> using the serial datatype. I.e., I have a table called countries with a
> column id which is of type serial and another field called country_name
> of type char(2). Postgresql generates a sequence countries_id_seq. When
> I try this:
>
> try{
>     // Initialze Torque
>              Torque.init( "../../opentac2.properties" );
>     Criteria crit = new Criteria();
>     crit.add (CountriesPeer.COUNTRY_NAME,"US");
>     Object o = CountriesPeer.doInsert (crit);
> }
> catch(Exception foo){
>     foo.printStackTrace();
> }
>
> I get this:
>
> java.sql.SQLException: ERROR:  pg_aclcheck: class "countries_seq" not
found
>          at
org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
>          at org.postgresql.Connection.ExecSQL(Connection.java:398)
>          at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
>          at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
>          at com.workingdogs.village.QueryDataSet.<init>(Unknown Source)
>          at
> org.apache.torque.oid.AutoIncrementIdGenerator.getIdAsVillageValue(Unknown
> Source)
>          at
> org.apache.torque.oid.AutoIncrementIdGenerator.getIdAsBigDecimal(Unknown
> Source)
>          at org.apache.torque.util.BasePeer.doInsert(Unknown Source)
>          at org.apache.torque.util.BasePeer.doInsert(Unknown Source)
>          at
> org.apache.torque.BaseCountriesPeer.doInsert(BaseCountriesPeer.java:170)
>          at
> org.apache.torque.BaseCountriesPeer.doInsert(BaseCountriesPeer.java:148)
>          at org.apache.torque.Main.main(Main.java:34)
> rethrown as org.apache.torque.TorqueException: ERROR:  pg_aclcheck:
> class "countries_seq" not found
>          at org.apache.torque.util.BasePeer.doInsert(Unknown Source)
>          at org.apache.torque.util.BasePeer.doInsert(Unknown Source)
>          at
> org.apache.torque.BaseCountriesPeer.doInsert(BaseCountriesPeer.java:170)
>          at
> org.apache.torque.BaseCountriesPeer.doInsert(BaseCountriesPeer.java:148)
>          at org.apache.torque.Main.main(Main.java:34)
> Caused by: java.sql.SQLException: ERROR:  pg_aclcheck: class
> "countries_seq" not found
>          at
org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
>          at org.postgresql.Connection.ExecSQL(Connection.java:398)
>          at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
>          at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
>          at com.workingdogs.village.QueryDataSet.<init>(Unknown Source)
>          at
> org.apache.torque.oid.AutoIncrementIdGenerator.getIdAsVillageValue(Unknown
> Source)
>          at
> org.apache.torque.oid.AutoIncrementIdGenerator.getIdAsBigDecimal(Unknown
> Source)
>
>
> TIA
> --
> Seth Milder
> Department of Physics and Astronomy
> MS 3f3
> George Mason University
> Fairfax, VA
> http://www.mrseth.org
> --
> Don't kid yourself. Little is relevant, and nothing lasts forever.
>
>


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

Reply via email to