Oops. Probably you are right. I have not read the case very well...
fedor.
> -----Original Message-----
> From: John McNally [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 13, 2001 11:57 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Different instance of the same object
>
>
> this is a bug. i will fix it when i can get to it, or you
> can submit a
> patch, if you can read the source templates.
>
> basically instead of
>
> collection = FooPeer.doSelect(criteria) in the
> getFoos(Criteria) method
> it should be
>
> tempColl = FooPeer.doSelect
> collection = new Vector();
> loop over tempColl
> addFoo(tempColl.get(i));
> end
>
> The template is in turbine's source tree as
> conf/torque/templates/om/Object.vm
>
> Note that a decision was made that the Peer system would not be fully
> self-consistent as this increases the database activity and OM objects
> are generally instantiated with a specific purpose and thrown away
> quickly, so self-consistency is not worth it. But that does not hold
> for the case you describe.
>
> john mcnally
>
> Xavier wrote:
> >
> > Hi,
> >
> > I have some problem with multiple instant of one object in
> the simple case
> >
> --------------------------------------------------------------
> --------------
> > -
> > ....
> > Criteria myC = new Criteria();
> > myC.add(ParentPeer.ID,"1");
> > Vector aResultList = ParentPeer.doSelect(myC); // myParent
> is load from db
> >
> > myParent = (Parent)aResultList.firstElement();
> >
> > myChild = (Child)myParent.getChilds().get(1); // myChild is
> load from db
> >
> > myParent2 = myChild.getParent(); // myParent is load again from db
> > ----------------------------------------------------------------
> >
> > myParent and myParent2 are different instance!
> > It's possible to avoid that? it's forecast?
> >
> > Xa
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]