void testDeleteInsert()
{
broker.beginTransaction();
MainObject main1 = new MainObject(1, "Something");
main1.add(new SubObject("A subobject"));
broker.store(main1);
broker.commitTransaction();
broker.beginTransaction();
broker.serviceConnectionManager().setBatchMode(true);
broker.delete(main1);
MainObject main2 = new MainObject(1, "Something");
main2.add(new SubObject("A subobject"));
broker.store(main2);
broker.commitTransaction();
}
void testEquals()
{
broker.beginTransaction();
MainObject main1 = new MainObject(10, "S");
main1.add(new SubObject("A subobject"));
broker.store(main1);
MainObject main2 = new MainObject(10, "S");
main2.add(new SubObject("A subobject"));
broker.store(main2);
broker.commitTransaction();
// new PB instance
tearDown();
setUp();
Identity ident = new Identity(MainObject.class, MainObject.class, new
Object[] {new Integer(10)});
MainObject main3 = (MainObject) broker.getObjectByIdentity(ident);
MainObject main4 = new MainObject(10, "S");
main4.add(new SubObject("A subobject"));
assertEquals(main3, main4);
}
void testDelete()
{
broker.beginTransaction();
MainObject main1 = new MainObject(20, "Something");
main1.add(new SubObject("A subobject"));
main1.add(new SubObject("A subobject"));
broker.store(main1);
broker.delete(main1);
broker.commitTransaction();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]