db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter S. Hamlen" <pham...@mail.com>
Subject Re: how to generate removeObject() methods? (was: AW: how to tellthe bo that a foreign collection must be reloaded?)
Date Wed, 19 Feb 2003 15:16:31 GMT
My mistake.  That's not in the regular Torque templates.
You can look at my previous post for more information.

-Peter

On Wed, 2003-02-19 at 09:46, Marc Lustig wrote:
> Also, my torque-generated user objects don't have any removeObject()
> methods. (addObject()'s are available).
> Why is that?
> 
> torque.complexObjectModel=true
> 
> 
> > -----Urspr√ľngliche Nachricht-----
> > Von: Peter S. Hamlen [mailto:phamlen@mail.com]
> > Gesendet: Dienstag, 18. Februar 2003 19:39
> > An: Turbine Torque Users List
> > Betreff: Re: how to tell the bo that a foreign collection must be
> > reloaded?
> >
> >
> > Well, depending on what you're doing, there are several answers:
> >
> > 1)  If you get the foreign object from the collObjects list, then you
> > don't need to do anything (because the object is still in the list and
> > has been changed in place.)
> >
> > 2)  If you're adding or removing foreign objects, then you may need to
> > reload the list.
> >   a)   The easiest way is to use the addObject() and removeObject()
> > methods in the user object.  This automatically adds/removes the foreign
> > object from the collObjects list and no reload is necessary.
> >   b)  In the cases where (for whatever reason) you can't use the
> > addObject and removeObject functions, you may need to alter the base
> > Template that generates your classes.  We added a "clearCollection"
> > function to all our obejcts that clears these collObjects.  (I realize
> > this means altering the templates which people may not feel like doing.)
> >
> > Hope this helps.
> > -Peter
> >
> > On Sat, 2003-02-15 at 18:12, Marc Lustig wrote:
> > > Hi,
> > > I have related an attribute of the user over the foreign key.
> > > The foreign objects are stored in the collObjects List.
> > > After I changed one of the related objects, what is the proper
> > way to tell
> > > my user object that this object-collection needs to be updated (reloaded
> > > from db)?
> > > Problem is even if I call user.getObjects(new Criteria()) this
> > doesn't make
> > > sure that the collection will be reloaded since the last
> > request might also
> > > have used an empty criteria.
> > > Idea?
> > >
> > > Marc
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > > For additional commands, e-mail: torque-user-help@db.apache.org
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 



Mime
View raw message