I have had this occur when multiple, differently named "appname???
-schema.xml" files exist. When I deleted those files that were extraneous
(they were only there for testing), the problem went away.
----------------------------------------------
David
Graham Leggett
<minfrin@sharp.fm To: torque-dev@db.apache.org
> cc:
Subject: om/map/* files are rendered twice
04/24/03 10:44 AM
Please respond to
"Turbine Torque
Developers List"
Hi all,
For some weird reason, when I run torque and get it to generate the
files in the map directory, it generates the file twice in the same
file, as attached. The resultant code does not compile.
Anyone have a fix or a workaround for this?
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm "There's a moon
over Bourbon Street
tonight..."
package za.co.fma.patricia.database.om.map;
import java.util.Date;
import java.math.BigDecimal;
import org.apache.torque.Torque;
import org.apache.torque.TorqueException;
import org.apache.torque.map.MapBuilder;
import org.apache.torque.map.DatabaseMap;
import org.apache.torque.map.TableMap;
/**
* This class was autogenerated by Torque on:
*
* [Thu Apr 24 15:52:49 SAST 2003]
*
*/
public class MoneyMapBuilder implements MapBuilder
{
/**
* The name of this class
*/
public static final String CLASS_NAME =
"za.co.fma.patricia.database.om.map.MoneyMapBuilder";
/**
* The database map.
*/
private DatabaseMap dbMap = null;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return true if this DatabaseMapBuilder is built
*/
public boolean isBuilt()
{
return (dbMap != null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public DatabaseMap getDatabaseMap()
{
return this.dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @throws TorqueException
*/
public void doBuild() throws TorqueException
{
dbMap = Torque.getDatabaseMap("patricia");
dbMap.addTable("money");
TableMap tMap = dbMap.getTable("money");
tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
tMap.setPrimaryKeyMethodInfo(tMap.getName());
tMap.addPrimaryKey("money.MONEY_ID",
new Integer(0));
tMap.addColumn
("money.COMPANY_ID",
new Integer(0));
tMap.addColumn
("money.DESCRIPTION",
new Double(0));
tMap.addColumn
("money.MONEY_DATE",
new Double(0));
tMap.addColumn
("money.AMOUNT",
new Double(0));
tMap.addColumn
("money.VAT", new
Double(0));
tMap.addColumn
("money.TOTAL", new
Double(0));
tMap.addColumn
("money.MONEYCATEGORY_ID",
new Double(0));
tMap.addColumn
("money.PENCIL",
new Boolean(true));
}
}
package za.co.fma.patricia.database.om.map;
import java.util.Date;
import java.math.BigDecimal;
import org.apache.torque.Torque;
import org.apache.torque.TorqueException;
import org.apache.torque.map.MapBuilder;
import org.apache.torque.map.DatabaseMap;
import org.apache.torque.map.TableMap;
/**
* This class was autogenerated by Torque on:
*
* [Thu Apr 24 15:52:49 SAST 2003]
*
*/
public class MoneyMapBuilder implements MapBuilder
{
/**
* The name of this class
*/
public static final String CLASS_NAME =
"za.co.fma.patricia.database.om.map.MoneyMapBuilder";
/**
* The database map.
*/
private DatabaseMap dbMap = null;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return true if this DatabaseMapBuilder is built
*/
public boolean isBuilt()
{
return (dbMap != null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public DatabaseMap getDatabaseMap()
{
return this.dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @throws TorqueException
*/
public void doBuild() throws TorqueException
{
dbMap = Torque.getDatabaseMap("patricia");
dbMap.addTable("money");
TableMap tMap = dbMap.getTable("money");
tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
tMap.setPrimaryKeyMethodInfo(tMap.getName());
tMap.addPrimaryKey
("money.MONEYCATEGORY_ID",
new Integer(0));
tMap.addColumn
("money.MONEY_DATE",
new Double(0));
tMap.addColumn
("money.AMOUNT",
new Double(0));
tMap.addColumn
("money.VAT", new
Double(0));
tMap.addColumn
("money.TOTAL", new
Double(0));
tMap.addColumn
("money.CATEGORY",
new Double(0));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
|