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 MtoNTest.java
Date Mon, 26 Jul 2004 16:04:03 GMT
brj         2004/07/26 09:04:03

  Modified:    src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        MtoNTest.java
  Log:
  - fixed issue with CollectionProxy and RemovalAwareCollection
  - RemovalAwareCollection is no longer the default collection-class for m:n-relationships
  - ManageableCollection#afterStore is only called if cascadeStoring is CASCADE_OBJECT
  
  - ojb no longer adds groupBy columns to the SELECT-clause, orderBy columns are still added
because of sapdb
  - orderBy columns of the original query are used as joinAttributes in count-query
  - ALIAS-prefix again works for report-queries (see QueryTest#testReportQueryAlias)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.15.2.1  +13 -12    db-ojb/src/test/org/apache/ojb/broker/MtoNTest.java
  
  Index: MtoNTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/MtoNTest.java,v
  retrieving revision 1.15
  retrieving revision 1.15.2.1
  diff -u -r1.15 -r1.15.2.1
  --- MtoNTest.java	31 May 2004 22:57:21 -0000	1.15
  +++ MtoNTest.java	26 Jul 2004 16:04:03 -0000	1.15.2.1
  @@ -2,6 +2,7 @@
   
   import org.apache.ojb.broker.metadata.ClassDescriptor;
   import org.apache.ojb.broker.metadata.CollectionDescriptor;
  +import org.apache.ojb.broker.metadata.ObjectReferenceDescriptor;
   import org.apache.ojb.broker.util.collections.ManageableArrayList;
   import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
   import org.apache.ojb.junit.PBTestCase;
  @@ -70,9 +71,9 @@
       {
           ClassDescriptor cld = broker.getClassDescriptor(Paper.class);
           CollectionDescriptor cod = cld.getCollectionDescriptorByName("qualifiers");
  -        boolean autoUpdate = cod.getCascadeStore();
  +        int autoUpdate = cod.getCascadingStore();
   
  -        cod.setCascadeStore(false);
  +        cod.setCascadingStore(ObjectReferenceDescriptor.CASCADE_LINK);
   
           try
           {
  @@ -96,7 +97,7 @@
           }
           finally
           {
  -            cod.setCascadeStore(autoUpdate);
  +            cod.setCascadingStore(autoUpdate);
           }
       }
   
  @@ -108,9 +109,9 @@
       {
           ClassDescriptor cld = broker.getClassDescriptor(Paper.class);
           CollectionDescriptor cod = cld.getCollectionDescriptorByName("qualifiers");
  -        boolean autoUpdate = cod.getCascadeStore();
  +        int autoUpdate = cod.getCascadingStore();
   
  -        cod.setCascadeStore(false);
  +        cod.setCascadingStore(ObjectReferenceDescriptor.CASCADE_LINK);
   
           try
           {
  @@ -135,7 +136,7 @@
           }
           finally
           {
  -            cod.setCascadeStore(autoUpdate);
  +            cod.setCascadingStore(autoUpdate);
           }
       }
   
  @@ -146,9 +147,9 @@
       {
           ClassDescriptor cld = broker.getClassDescriptor(Paper.class);
           CollectionDescriptor cod = cld.getCollectionDescriptorByName("qualifiers");
  -        boolean autoUpdate = cod.getCascadeStore();
  +        int autoUpdate = cod.getCascadingStore();
   
  -        cod.setCascadeStore(true);
  +        cod.setCascadingStore(ObjectReferenceDescriptor.CASCADE_OBJECT);
   
           try
           {
  @@ -172,7 +173,7 @@
           }
           finally
           {
  -            cod.setCascadeStore(autoUpdate);
  +            cod.setCascadingStore(autoUpdate);
           }
       }
   
  @@ -312,12 +313,12 @@
           Paper retPaper = (Paper) broker.getObjectByIdentity(paperId);
           assertEquals(0, retPaper.getQualifiers().size());
   
  -        // target objects should be deleted
  +        // target objects should NOT be deleted
           Qualifier retQual1 = (Qualifier) broker.getObjectByIdentity(new Identity(qual1,
broker));
           Qualifier retQual2 = (Qualifier) broker.getObjectByIdentity(new Identity(qual2,
broker));
   
  -        assertNull(retQual1);
  -        assertNull(retQual2);
  +        assertNotNull(retQual1);
  +        assertNotNull(retQual2);
   
           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