This is appearing in the logs:
DEBUG,2004-10-29 13:07:28,com.vawter.omreporting.utility.DatabaseUpdate,Torque exceptionIdGenerator for table 'tbl_Metric' is null
The table use native autoincrement and from the snippets below everything looks ok in db.
Does anybody have a clue as to why I am getting this?
Here is the DDL from MySQL
CREATE TABLE `tbl_Metric` ( `metric_id` int(11) NOT NULL auto_increment, `metric` varchar(50) NOT NULL default '', PRIMARY KEY (`metric_id`) ) TYPE=InnoDB
So the table should autoincrement the key
Here is the relevant snippet from the schema
<database name="omreporting" defaultIdMethod="native" package="com.vawter.omreporting.om" >
<table name="tbl_Metric" description="Metrics" idMethod="native">
<column
name="metric_id"
required="true"
primaryKey="true"
type="INTEGER"
autoIncrement="true"
description="Metric Id"/>
and here is a snippet from TblMetricMapBuilder.java
public void doBuild() throws TorqueException { dbMap = Torque.getDatabaseMap("omreporting");
dbMap.addTable("tbl_Metric"); TableMap tMap = dbMap.getTable("tbl_Metric");
tMap.setPrimaryKeyMethod(TableMap.NATIVE);
tMap.addPrimaryKey("tbl_Metric.METRIC_ID", new Integer(0)); tMap.addColumn("tbl_Metric.METRIC", new String()); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]