assertEquals(count, 0);
// -------------
// test comfortable object
Store s1 = new Store();
s1.setName("Creasy Bookstore");
s1.setAddress("The Oaks\nDublin");
s1.create(manager);
s1.setAddress("The Lakes\nDublin");
s1.save();
// test change in another session and reload
Store s2 = (Store) manager.getObject(Store.class, s1.getId());
s2.setAddress("");
s2.save();
s1.reload();
assertEquals(s1.getAddress(), s2.getAddress());
// remove and check behavior of updates
s1.remove();
try {
s2.reload();
assertTrue(false);
} catch (MException e) {
System.out.println(e);
}
try {
s2.save();
assertTrue(false);
} catch (MException e) {
System.out.println(e);
}