Re: [Modelj-user] Perform_Save_Existing
Status: Beta
Brought to you by:
tom_tessier
|
From: Tom T. <tom...@ho...> - 2003-05-27 04:40:28
|
Hi Eric, Actually, performSaveExisting is only called when you associate an existing object to another that contains it in a one-to-many relationship. So far example, when you have Role-Users one-to-many relationship, and associate an existing User to an existing Role, the performSaveExisting method of Role will be called. Currently, both objects in one-to-one relationships are saved simulatenously to the database, regardlessly of whether one is blank or not. Any suggestions on why this shouldn't be so? Tom >From: Eric Dunn <ed...@me...> >To: "'mod...@li...'" ><mod...@li...> >Subject: [Modelj-user] Perform_Save_Existing >Date: Mon, 26 May 2003 21:11:08 -0700 >MIME-Version: 1.0 >Received: from sc8-sf-list2.sourceforge.net ([66.35.250.206]) by >mc9-f17.bay6.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Mon, 26 May >2003 21:10:13 -0700 >Received: from sc8-sf-list1-b.sourceforge.net ([10.3.1.13] >helo=sc8-sf-list1.sourceforge.net)by sc8-sf-list2.sourceforge.net with >esmtp (Exim 3.31-VA-mm2 #1 (Debian))id 19KVnE-00082D-00; Mon, 26 May 2003 >21:10:32 -0700 >Received: from mail16.messagelabs.com ([64.124.170.131])by >sc8-sf-list1.sourceforge.net with smtp (Exim 3.31-VA-mm2 #1 (Debian))id >19KVmI-0000Ic-00for <mod...@li...>; Mon, 26 May 2003 >21:09:35 -0700 >Received: (qmail 27930 invoked from network); 27 May 2003 04:01:16 -0000 >Received: from diquil.merc-int.com (HELO merc-int.com) (64.242.155.19) by >server-6.tower-16.messagelabs.com with SMTP; 27 May 2003 04:01:16 -0000 >Received: from sunexbh01.merc-int.com (sunexbh01.merc-int.com >[64.242.153.21])by merc-int.com (8.11.2/8.11.2) with ESMTP id >h4R49V116957for <mod...@li...>; Mon, 26 May 2003 >21:09:31 -0700 >Received: by sunexbh01.merc-int.com with Internet Mail Service >(5.5.2653.19)id <LD8Z8BZK>; Mon, 26 May 2003 21:09:31 -0700 >X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP >X-VirusChecked: Checked >X-Env-Sender: ed...@me... >X-Msg-Ref: server-6.tower-16.messagelabs.com!1054008076!504 >Message-ID: ><BA4...@sv...> >X-Mailer: Internet Mail Service (5.5.2653.19) >Sender: mod...@li... >Errors-To: mod...@li... >X-BeenThere: mod...@li... >X-Mailman-Version: 2.0.9-sf.net >Precedence: bulk >List-Help: <mailto:mod...@li...?subject=help> >List-Post: <mailto:mod...@li...> >List-Subscribe: ><https://lists.sourceforge.net/lists/listinfo/modelj-user>,<mailto:mod...@li...?subject=subscribe> >List-Id: <modelj-user.lists.sourceforge.net> >List-Unsubscribe: ><https://lists.sourceforge.net/lists/listinfo/modelj-user>,<mailto:mod...@li...?subject=unsubscribe> >List-Archive: ><http://sourceforge.net/mailarchive/forum.php?forum=modelj-user> >Return-Path: mod...@li... >X-OriginalArrivalTime: 27 May 2003 04:10:13.0100 (UTC) >FILETIME=[DEFC02C0:01C32405] > >Hi guys, > First I'd like to say I like your product's design and appreciate >its simplicity, and use of good design >patterns. > > My problem is this, I noticed in your code in your struts action >classes, I have generated performSave >methods. If this entity 'A' is involved in a relationship with 'B', the >generated code will always create a >new 'B' row in the database, regardless if one exists or not. > > Now I took a look at your guys BaseAction class and saw the contant >for "PERFORM_SAVE_EXISTING". This is >actually exactly what I want, but for some reason either, > >1) I have missed some flag in the sample.xml, or >2) your code does not generate this method. > >How do I get this method to be generated? If it does not support this >functionality I suppose I have to write >it myself =). > >Thanks so much, >Eric Dunn > > > >------------------------------------------------------- >This SF.net email is sponsored by: ObjectStore. >If flattening out C++ or Java code to make your application fit in a >relational database is painful, don't do it! Check out ObjectStore. >Now part of Progress Software. http://www.objectstore.net/sourceforge >_______________________________________________ >Modelj-user mailing list >Mod...@li... >https://lists.sourceforge.net/lists/listinfo/modelj-user _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail |