I'm using the bookstore-schema.xml and the id-table.xml files from the tutorial on the Torque website. The only thing that I changed in them was in the bookstore-schema.xml and I added in the auto-increment support. It didn't seem to auto-increment the id's until I went in to each table and set the attribute idMethod="native" and in each column that I wanted to increment I set the attribute autoIncrement="true". I found this on one of the bug fixes that was listed for Torque. It seems to work when I build everything from an ant build from those files that I've defined. This is how the database was built. Then now that I've used the jdbc call to get those databases that were defined (using Torque mind you), it gives this duplicate entry.

-Brandon


From: [EMAIL PROTECTED]
Reply-To: "Apache Torque Users List" <[email protected]>
To: "Apache Torque Users List" <[email protected]>
Subject: Re: torque:jdbc isn't right
Date: Thu, 24 Feb 2005 14:54:56 -0600

It sounds like your id-table logic is embedded into your app-schema.xml,
instead of broken out into a separate schema file.

Adam





"Brandon"
<[EMAIL PROTECTED]> To: "Apache Torque Users List" <[email protected]>
cc:
Subject: torque:jdbc isn't right
02/24/05 10:30 AM
Please respond to
"Apache Torque Users
List"






I'm having a problem using the torque:jdbc call.  It doesn't seem to be
treating the database as using the native idMethod even though I defined
the
DB that way, and used Torque to create and populate the DB.  But it doesn't

seem to be pulling the very information that it put into the database.
Surprisingly enough it does create the XML files properly, and everything
seems to be working properly, but it creates a class called
BaseIdTablePeer.
The interesting thing is that it creates a duplicate name for a String in
the file.  Here's what the generated code looks like:

/** the default database name for this class */
public static final String DATABASE_NAME = "default";

/** the table name for this class */
public static final String TABLE_NAME = "id_table";

/**
 * @return the map builder for this peer
 * @throws TorqueException Any exceptions caught during processing will be
 *                rethrown wrapped into a TorqueException
 */
public static MapBuilder getMapBuilder()
      throws TorqueException
{
      return getMapBuilder(IdTableMapBuilder.CLASS_NAME);
}

/** the column name for the ID_TABLE_ID field */
public static final String ID_TABLE_ID;
/** the column name for the TABLE_NAME field */
public static final String TABLE_NAME;




Notice that the string TABLE_NAME is defined twice. I am not sure why it is generating things like this. It also indicates that it's using the id_table stuff rather than the native stuff I defined when I created the DB for the idMethod. Anyone have any thoughts?

-Brandon

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





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


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



Reply via email to