db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: jakarta-ojb/src/test/org/apache/ojb/broker PolymorphicExtents.java
Date Wed, 04 Dec 2002 21:14:43 GMT
thma        2002/12/04 13:14:43

  Modified:    src/test/org/apache/ojb/broker PolymorphicExtents.java
  Log:
  avoid calling invalid API
  
  Revision  Changes    Path
  1.9       +7 -1      jakarta-ojb/src/test/org/apache/ojb/broker/PolymorphicExtents.java
  
  Index: PolymorphicExtents.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/broker/PolymorphicExtents.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PolymorphicExtents.java	21 Nov 2002 22:21:03 -0000	1.8
  +++ PolymorphicExtents.java	4 Dec 2002 21:14:43 -0000	1.9
  @@ -3,6 +3,9 @@
   import java.util.Collection;
   
   import junit.framework.TestCase;
  +
  +import org.apache.ojb.broker.metadata.ClassDescriptor;
  +import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryByIdentity;
  @@ -236,7 +239,10 @@
           //System.out.println("next free UID for InterfaceArticle : " + uid);
   
           // the next id from the sequence should be uid + 1, even if we did not store any
object using uid.
  -        int nextUid = broker.getUniqueId(InterfaceArticle.class, "articleId");
  +    	ClassDescriptor cld = broker.getClassDescriptor(InterfaceArticle.class);
  +        FieldDescriptor fld = cld.getFieldDescriptorByName("articleId");
  +
  +        int nextUid = broker.getUniqueId(fld);
           assertEquals("nextUid - uid = 1 !!!", 1, nextUid - uid);
   
   	}
  
  
  

Mime
View raw message