Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 57984 invoked from network); 19 Feb 2003 14:46:00 -0000 Received: from moutng.kundenserver.de (212.227.126.189) by daedalus.apache.org with SMTP; 19 Feb 2003 14:46:00 -0000 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 18lVU1-0001EE-00 for torque-user@db.apache.org; Wed, 19 Feb 2003 15:46:01 +0100 Received: from [217.224.244.173] (helo=lustig) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 18lVU1-0006VW-00 for torque-user@db.apache.org; Wed, 19 Feb 2003 15:46:01 +0100 From: "Marc Lustig" To: "Turbine Torque Users List" Subject: how to generate removeObject() methods? (was: AW: how to tell the bo that a foreign collection must be reloaded?) Date: Wed, 19 Feb 2003 15:46:01 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 In-Reply-To: <1045593528.16440.6952.camel@chimayblue.tfanet.org> Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 >