Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 2772 invoked by uid 98); 9 Dec 2002 19:01:12 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 2467 invoked from network); 9 Dec 2002 19:01:08 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 9 Dec 2002 19:01:08 -0000 Received: (qmail 41600 invoked by uid 500); 9 Dec 2002 18:59:58 -0000 Received: (qmail 41593 invoked from network); 9 Dec 2002 18:59:58 -0000 Received: from pcow058o.blueyonder.co.uk (HELO blueyonder.co.uk) (195.188.53.98) by daedalus.apache.org with SMTP; 9 Dec 2002 18:59:58 -0000 Received: from pcow058m.blueyonder.co.uk ([127.0.0.1]) by blueyonder.co.uk with Microsoft SMTPSVC(5.5.1877.757.75); Mon, 9 Dec 2002 19:00:01 +0000 Received: from localhost (unverified [80.194.24.21]) by pcow058m.blueyonder.co.uk (Content Technologies SMTPRS 4.2.9) with ESMTP id for ; Mon, 9 Dec 2002 19:00:01 +0000 Date: Mon, 9 Dec 2002 19:00:23 +0000 Subject: Re: [betwixt] info on .betwixt files, "add" methods, and CyclicReferenceExceptions Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: robert burrell donkin To: "Jakarta Commons Users List" Content-Transfer-Encoding: 7bit In-Reply-To: <1039437036.5201.41.camel@swami> Message-Id: <78A86DE9-0BA8-11D7-8C4D-003065DC754C@blueyonder.co.uk> X-Mailer: Apple Mail (2.482) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Monday, December 9, 2002, at 12:30 PM, Martin van den Bemt wrote: > On Sat, 2002-12-07 at 21:10, Darren Scott wrote: >> 3) I seem to get CyclicReferenceExceptions when I don't expect to. Maybe >> it's my misunderstanding of what a graph cycle is, but I took it to mean >> when you get into an infinite cycle with references e.g. A refers to B, >> B refers to C, C refers to A, A refers to B etc. I get these exceptions >> raised when I have a collection containing multiple references to the >> same object. I wouldn't have expected this situation to be treated as a >> cycle. > > The cyclic checking isn't that advanced yet. The scenario that A refers > to another A is covered however. Since the cyclic stuff also has some > relation when you use id's (and I am not into id's that much), I > probably have to have some help with the id handling. > Time to read some specs on that :) yeh. i've been wanting to improve this for some time now. your understanding of a cyclic graph is correct. the problem is that at the moment, betwixt is pretty dumb and will throw a cycle reference exception if it encounters the same bean if id's aren't been written. i have played about with various ways of improving the situation but they' ve all proved unsatisfactory. probably the basic betwixt design needs to be improved. martin - if you've got some cycles, maybe we could throw ideas around. - robert