Return-Path: Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 28180 invoked by uid 500); 2 May 2003 08:39:06 -0000 Received: (qmail 28176 invoked from network); 2 May 2003 08:39:05 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 2 May 2003 08:39:05 -0000 Received: (qmail 56914 invoked by uid 1524); 2 May 2003 08:39:04 -0000 Date: 2 May 2003 08:39:04 -0000 Message-ID: <20030502083904.56913.qmail@icarus.apache.org> From: thma@apache.org To: db-ojb-cvs@apache.org Subject: cvs commit: db-ojb/src/test/org/apache/ojb repository_junit.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N thma 2003/05/02 01:39:04 Modified: src/test/org/apache/ojb/odmg ManyToManyTest.java ODMGGourmet.java src/test/org/apache/ojb repository_junit.xml Log: If we use ODMG persistent collections everything works fine with m:n too... I have no idea how get these things done without using DListImpl. IMO this would require bytecode modification as in JDO... Revision Changes Path 1.8 +6 -4 db-ojb/src/test/org/apache/ojb/odmg/ManyToManyTest.java Index: ManyToManyTest.java =================================================================== RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/ManyToManyTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ManyToManyTest.java 2 Apr 2003 21:07:11 -0000 1.7 +++ ManyToManyTest.java 2 May 2003 08:39:04 -0000 1.8 @@ -376,10 +376,10 @@ /* now we lock main object and add remove a reference object */ - List foodList = gourmet_doris.getFavoriteFood(); - foodList.remove(0); tx.lock(gourmet_doris, Transaction.WRITE); - gourmet_doris.setFavoriteFood(foodList); + List foodList = gourmet_doris.getFavoriteFood(); + foodList.remove(0); + //gourmet_doris.setFavoriteFood(foodList); tx.commit(); query = odmg.newOQLQuery(); @@ -393,6 +393,8 @@ assertEquals("We should found a gourmet_doris", 1, result.size()); gourmet_doris = (ODMGGourmet)result.get(0); tx.commit(); - assertEquals(2, fishs.size()); + assertEquals( + "We removed one fish, so doris should only have two entries left", + 2, gourmet_doris.getFavoriteFood().size()); } } 1.2 +3 -0 db-ojb/src/test/org/apache/ojb/odmg/ODMGGourmet.java Index: ODMGGourmet.java =================================================================== RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/ODMGGourmet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ODMGGourmet.java 25 Jul 2002 12:45:39 -0000 1.1 +++ ODMGGourmet.java 2 May 2003 08:39:04 -0000 1.2 @@ -1,6 +1,7 @@ package org.apache.ojb.odmg; import org.apache.ojb.broker.Gourmet; +import org.apache.ojb.odmg.collections.DListImpl; /** * class used to test polymorphic m:n collections (ODMG-variant) @@ -16,6 +17,7 @@ public ODMGGourmet() { super(); + this.setFavoriteFood(new DListImpl()); } /** @@ -25,6 +27,7 @@ public ODMGGourmet(String name) { super(name); + this.setFavoriteFood(new DListImpl()); } } 1.62 +1 -0 db-ojb/src/test/org/apache/ojb/repository_junit.xml Index: repository_junit.xml =================================================================== RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/repository_junit.xml,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- repository_junit.xml 14 Apr 2003 16:45:34 -0000 1.61 +++ repository_junit.xml 2 May 2003 08:39:04 -0000 1.62 @@ -2459,6 +2459,7 @@ />