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 ma...@apache.org on 2003/07/01 03:49:43 UTC
cvs commit: db-ojb/src/test/org/apache/ojb/odmg ContractVersionEffectivenessOQLTest.java
mattbaird 2003/06/30 18:49:43
Modified: src/test/org/apache/ojb/odmg
ContractVersionEffectivenessOQLTest.java
Log:
Test case to show error in getting projection attribute that is an object, not suitable for a reportQuery
Revision Changes Path
1.8 +28 -0 db-ojb/src/test/org/apache/ojb/odmg/ContractVersionEffectivenessOQLTest.java
Index: ContractVersionEffectivenessOQLTest.java
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/ContractVersionEffectivenessOQLTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ContractVersionEffectivenessOQLTest.java 5 Feb 2003 20:04:40 -0000 1.7
+++ ContractVersionEffectivenessOQLTest.java 1 Jul 2003 01:49:42 -0000 1.8
@@ -217,6 +217,34 @@
}
}
+ public void testGetEmbeddedObject()
+ throws Exception
+ {
+ Implementation odmg = OJB.getInstance();
+ Database db = odmg.newDatabase();
+ db.open(databaseName, Database.OPEN_READ_WRITE);
+ try
+ {
+ createData(db, odmg);
+ OQLQuery query = odmg.newOQLQuery();
+ int i = 0;
+ query.create("select effectiveness.version from " + Effectiveness.class.getName());
+ ManageableCollection all = (ManageableCollection) query.execute();
+ java.util.Iterator it = all.ojbIterator();
+ Object temp1 = null;
+ Version temp = null;
+ while (it.hasNext())
+ {
+ temp1 = it.next();
+ temp = (Version)temp1;
+ }
+ }
+ finally
+ {
+ db.close();
+ }
+ }
+
public void testGetWithContractCriteria()
throws Exception