Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 398 invoked from network); 3 Jul 2004 18:41:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Jul 2004 18:41:29 -0000 Received: (qmail 51766 invoked by uid 500); 3 Jul 2004 18:41:29 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 51555 invoked by uid 500); 3 Jul 2004 18:41:24 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 51388 invoked by uid 99); 3 Jul 2004 18:41:19 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=HTTP_WITH_EMAIL_IN_URL,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.27.1) with SMTP; Sat, 03 Jul 2004 11:41:18 -0700 Received: (qmail 9065 invoked by uid 65534); 3 Jul 2004 18:41:07 -0000 Received: from adsl-62-167-51-237.adslplus.ch (EHLO [192.168.1.10]) (62.167.51.237) by mail.gmx.net (mp022) with SMTP; 03 Jul 2004 20:41:07 +0200 X-Authenticated: #15507884 Message-ID: <40E6FDF2.4000005@gmx.ch> Date: Sat, 03 Jul 2004 20:41:54 +0200 From: Jakob Braeuchi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: OJB Developers List Subject: ManageableCollection.afterStore and auto-update ? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hi all, while investigating the problem bogdan posted http://nagoya.apache.org/eyebrowse/ReadMsg?listName=ojb-dev@db.apache.org&msgNo=8137 i came across a potential problem with ManageableCollection.afterStore(). afterStore is called when auto-update is set to 'link' and 'object'. i did a check to call ManageableCollection#afterStore only when CASCADE_OBJECT (auto-update = 'object' or 'true') is used, but actually i'm not sure whether this is always correct ? ... // if CASCADE_NONE was set, do nothing with referenced objects if (cod.getCascadingStore() != ObjectReferenceDescriptor.CASCADE_NONE) { Object referencedObjects = cod.getPersistentField().get(obj); if (cod.isMtoNRelation()) { storeAndLinkMtoN(false, obj, cod, referencedObjects, insert); } else { storeAndLinkOneToMany(false, obj, cod, referencedObjects, insert); } // BRJ: only when auto-update = object if ((cod.getCascadingStore() == ObjectReferenceDescriptor.CASCADE_OBJECT) && (referencedObjects instanceof ManageableCollection)) { ((ManageableCollection) referencedObjects).afterStore(this); } } any ideas or comments on this issue ? jakob --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org