Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 54353 invoked from network); 20 Apr 2005 05:02:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Apr 2005 05:02:07 -0000 Received: (qmail 66879 invoked by uid 500); 20 Apr 2005 05:02:06 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 66851 invoked by uid 500); 20 Apr 2005 05:02:05 -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 61396 invoked by uid 99); 19 Apr 2005 21:03:54 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Message-ID: <400840257.1113943224383.JavaMail.jira@ajax.apache.org> Date: Tue, 19 Apr 2005 22:40:24 +0200 (CEST) From: "Martin Taal (JIRA)" To: ojb-dev@db.apache.org Subject: [jira] Created: (OJB-29) Infinite loop in case of refresh=true and cycles in references Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Infinite loop in case of refresh=true and cycles in references -------------------------------------------------------------- Key: OJB-29 URL: http://issues.apache.org/jira/browse/OJB-29 Project: OJB Type: Bug Components: PB-API Versions: 1.0.3 Reporter: Martin Taal Attachments: testcasesimple.zip Hi Armin, I have attached the objects I try to persist, the sql to generate the database and the repository xml in the zip file which I will attach shortly. I execute the code below to get a loop (and a stack overflow). Let me know if my setup is wrong. Good luck! gr. Martin PersistenceBroker broker = null; try { broker = PersistenceBrokerFactory.createPersistenceBroker(pbkey); { final A myA = new A(); final B myB = new B(); myA.setName("I am a"); myA.setMyB(myB); myB.setName("I am b"); myB.setMyA(myA); broker.beginTransaction(); broker.store(myA); broker.store(myB); broker.commitTransaction(); } // now read again { broker.clearCache(); Criteria criteria = new Criteria(); criteria.addEqualTo("Name", "I am a"); QueryByCriteria query = QueryFactory.newQuery(A.class, criteria); A myA = (A)broker.getObjectByQuery(query); // Here it loops (and stops with a stack overflow) assertTrue(myA.getMyB().getName().compareTo("I am b") == 0); } } finally { if (broker != null) broker.close(); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org