Ok, for me, that's ok. This method is more straigth.

I will modify the peer template to suit the method we explained
(createObject()...).

Another feature to add would be the readOnly="true" for tables. That allows
torque to generate or not the doInsert, doUpdate, doDelete method. I'm
thinking about tables contains list of countries, states and other static
information.
Do I add this feature ??

I already add the autoincrement value in the column class. I also have
modified the map template in the way that it use the database autoincrement
if it is set to true.

I will propose you my modification when every thing (or a big part) will be
done.

Herv�



----- Original Message -----
From: Leon Messerschmidt <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Friday, September 22, 2000 9:36 AM
Subject: Re: Newtorque proposals - contribution proposal


> > I believe you misunderstood me. Here is another explanation:
> >
> > Generated AddressPeer should look like this:
> > ----
> > public class AddressPeer extends BasePeer{
> > ....
> >     protected Address createObject()
> >     {
> >      return new Address();
> >     }
> >
> > ....
> >     public Vector doSelect(...)
> >     {
> >       ....
> > -     new Address();
> > +     createObject();
> >     }
> > -----
> >
> > MyAddressPeer would look smth like:
> > -----
> > public class MyAddressPeer extends AddressPeer
> > {
> >   ....
> >   protected Address createObject()
> >   {
> >     return new MyAddress();
> >   }
> > }
> > ---
> >
> > this way you do not need to edit generated AddressPeer and if you
regenerate
> > AddressPeer all your changes (which you made in MyAddressPeer) won't go
> > away.
> >
> > Makes more sense?
> >
>
> Makes a whole lot more sense :-)
>
> I think maybe we should go with this approach.  It allows you to check at
compile
> time if the objects are compatible (createObject() has to return  the
derived
> object).  With doSelect (Criteria, Classname) you might wind up with a
nasty
> ClassCastException you did not bargain on.
>
> Any other thoughts on this?
>
> ~ Leon
>
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
>



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