// must blow on saving new "read-only" object.
}
}
public void testCommitChangesRO4() throws Exception {
ROArtist a1 = fetchROArtist("artist1");
Painting painting = (Painting) context.newObject("Painting");
painting.setPaintingTitle("paint");
a1.addToPaintingArray(painting);
assertEquals(PersistenceState.MODIFIED, a1.getPersistenceState());
try {
context.commitChanges();
}
catch (Exception ex) {
fail("Updating 'read-only' object's to-many must succeed, instead an exception was thrown: "
+ ex);
}
assertEquals(PersistenceState.COMMITTED, a1.getPersistenceState());
}