Hi,
I am thinking of generating a very basic set of actions with Torque, along
with the OM generation. My idea is to start with insert/update/delete
actions for certain tables (you specify them in the input xml file).
I would like to know what the typical way is for a form that can do
inserts/updates to a table. We almost always have a single Update action
that does both inserts and updates. It looks something like this:
MyDBObject obj = new MyDBObject();
data.getParameters().setProperties (obj);
int id = data.getParameters().getInt ("objid");
if (id == 0)
{
// Sometimes add some specific code here
MyDBObjectPeer.doInsert (obj);
}
else
{
// Sometimes add some specific code here
MyDBObjectPeer.doUpdate (obj);
}
Would someone find it helpful if Torque generated code like this? Are there
any other inputs and/or ideas?
I would really appreciate some input regarding this, for I would like to
generate code that is useful to a large number of people (including myself
:-).
~ Leon
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]