references.add(a2);
// --------------------------------------------------------------------------------
// Create and store an object B in the repository which has a collection of A
// --------------------------------------------------------------------------------
B2 b = new B2();
b.setPath("/testB2");
b.setMultiReferences(references);
ocm.insert(b);
ocm.save();
// --------------------------------------------------------------------------------
// Retrieve object B
// --------------------------------------------------------------------------------
b = (B2) ocm.getObject("/testB2");
Collection allref = b.getMultiReferences();
assertNotNull("collection is null", allref);
assertTrue("Invalid number of items in the collection", allref.size() == 2);
this.contains(allref, "/a1" , A.class);
this.contains(allref, "/a2" , A.class);
// --------------------------------------------------------------------------------
// Update object B with an null value
// --------------------------------------------------------------------------------
b.setMultiReferences(null);
ocm.update(b);
ocm.save();
// --------------------------------------------------------------------------------
// Retrieve object B
// --------------------------------------------------------------------------------
b = (B2) ocm.getObject("/testB2");
assertNull("a is not null", b.getMultiReferences());
}
catch (Exception e)
{