throw new TorqueException("Database insert attempted without "
+ "anything specified to insert");
}
String dbName = criteria.getDbName();
Database database = Torque.getDatabase(dbName);
DatabaseMap dbMap = database.getDatabaseMap();
TableMap tableMap = dbMap.getTable(table);
Object keyInfo = tableMap.getPrimaryKeyMethodInfo();
IdGenerator keyGen
= database.getIdGenerator(tableMap.getPrimaryKeyMethod());
ColumnMap pk = getPrimaryKey(criteria);
// If the keyMethod is SEQUENCE or IDBROKERTABLE, get the id
// before the insert.