SelectQuery query = new SelectQuery(ROArtist.class, ExpressionFactory.matchExp(
Artist.ARTIST_NAME_PROPERTY,
"artist1"));
ROArtist a1 = (ROArtist) context.performQuery(query).get(0);
a1.writeProperty(ROArtist.ARTIST_NAME_PROPERTY, "abc");
try {
context.commitChanges();
fail("Updating a 'read-only' object must fail.");
}