I do not have the whole turbine OO schema in my head, but I have the
following idea:

Why not using an OO model instead of having this code reproduced in each
Classes?
For instance MyDBObject would inherit from BaseDBObject or something
else. 
Does it make sense?



Leon Messerschmidt wrote:
> 
> 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]

-- 
mailto:[EMAIL PROTECTED]  http://www.idbsoft.ch


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to