s.setReadOnly( coursePreferred, true );
checkProxyReadOnly( s, coursePreferred, true );
Criteria criteria = s.createCriteria( Student.class ).setReadOnly( false );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
assertFalse( s.isReadOnly( gavin ) );
assertFalse( Hibernate.isInitialized( coursePreferred ) );