db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker CollectionTest.java
Date Mon, 13 Dec 2004 18:15:18 GMT
brj         2004/12/13 10:15:18

  Modified:    src/test/org/apache/ojb/broker CollectionTest.java
  Log:
  no need to remove collection elements manually when auto-delete = false
  
  Revision  Changes    Path
  1.15      +2 -8      db-ojb/src/test/org/apache/ojb/broker/CollectionTest.java
  
  Index: CollectionTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/CollectionTest.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CollectionTest.java	5 Dec 2004 12:31:01 -0000	1.14
  +++ CollectionTest.java	13 Dec 2004 18:15:18 -0000	1.15
  @@ -351,7 +351,7 @@
           assertEquals("Wrong number of queried objects", 7, result.size());
   
           broker.beginTransaction();
  -        // now get all CollectibleB
  +        // now get all CollectibleB and delete them, because auto-delete is false
           List colBList = new_gatherer.getCollectiblesB();
           for (Iterator iterator = colBList.iterator(); iterator.hasNext();)
           {
  @@ -435,12 +435,6 @@
           // auto-retieve is false, so get references manually
           broker.retrieveAllReferences(gatherer);
           assertNotNull(gatherer.getCollectiblesC2());
  -        List colList = gatherer.getCollectiblesC2();
  -        for (Iterator iterator = colList.iterator(); iterator.hasNext();)
  -        {
  -            // delete all references first
  -            broker.delete(iterator.next());
  -        }
           broker.delete(gatherer);
           broker.commitTransaction();
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message