Rafal Krzewski wrote:
> I'm wondering how other Turbiners deal with it right now.
> I edited my generated classes by hand adding the additional functionality.
> I changed Peer classes also, to deal with object relationships (my BO is
> compound and thus represented by multiple tables. I wanted it to retrieve
> all data with single call to MasterObjectPeer.doSelect() and delete all data
> with single call to MasterObjectPeer.doDelete()).
> I had to edit the code by hand anyway because Torque smashed the case or my
> table/colum names :-(.

I do something similar I think (although not with torque yet).  I
slightly modified Jon's original code generator class to build the
compound object/peer classes based on the foreign keys declared in the
sql create table statements.  Then just added a boolean parameter to
doSelect to get back a vector of objects backed by multiple tables, plus
some methods to the generated objects to more lazily instantiate the
child objects if required.  I don't know if this is a particularly good
practice (seems half way between peers and what used to be OPaL), but I
find it a convenient abstraction.  Anyway, I still have to edit the Peer
class as others have described to return an extended generated object,
so +1 from this non-committer on the proposed change.

Regards,
Eric J Altman


------------------------------------------------------------
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