ComplexObject co1 = new ComplexObject(new double[] { 1.1, 2.2, 3.3, 4.4 });
persist.saveObject(co1);
// create an array of complex objects
ComplexArrayObject cao = new ComplexArrayObject();
ComplexObject[] coArray = new ComplexObject[3];
for (int x = 0; x < coArray.length; x++)
{
ComplexObject co = new ComplexObject();
co.setData(new double[] { x, x * 2, x * 3 });
SimpleObject so = new SimpleObject();
so.setAge((long) x);
co.setObject(so);
coArray[x] = co;
}
cao.setData(coArray);
persist.saveObject(cao);
persist.close();
persist = new PersistenceManager(driver, database, login, password);
List<ComplexArrayObject> res = persist.getObjectsMatching(new ComplexArrayObject());
assertEquals(1, res.size());
ComplexArrayObject ob1 = res.get(0);
assertEquals(3, ob1.getData().length);
persist.close();
}