You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by br...@apache.org on 2004/12/05 16:00:35 UTC
cvs commit: db-ojb/src/test/org/apache/ojb/broker OneToManyTest.java
brj 2004/12/05 07:00:35
Modified: src/test/org/apache/ojb/broker OneToManyTest.java
Log:
adapt to new behaviour of RemovalAwareCollection
Revision Changes Path
1.11 +7 -1 db-ojb/src/test/org/apache/ojb/broker/OneToManyTest.java
Index: OneToManyTest.java
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/OneToManyTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- OneToManyTest.java 22 Jun 2004 18:16:22 -0000 1.10
+++ OneToManyTest.java 5 Dec 2004 15:00:35 -0000 1.11
@@ -56,7 +56,13 @@
pg = (ProductGroupWithRemovalAwareCollection) broker.getObjectByIdentity(pgId);
assertEquals(3,pg.getAllArticles().size());
- pg.getAllArticles().remove(c);
+ InterfaceArticle ic = (InterfaceArticle) pg.getAllArticles().get(2);
+
+ // BRJ:
+ // the object to be removed must be part of the collection
+ // removing a materialized object when the collection contains proxies
+ // does not work with the new implementation of RemovalAwareCollection
+ pg.getAllArticles().remove(ic);
pg.getAllArticles().remove(0);
broker.beginTransaction();
broker.store(pg);
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org