GridType[] types = gridPropertyTypes;
for ( int i = 0; i < entityMetamodel.getPropertySpan(); i++ ) {
boolean include = isPropertyOfTable( i, j ) && versionability[i];
if ( include ) {
final GridType type = types[i];
final Object snapshotValue = type.nullSafeGet(
resultset, getPropertyColumnNames( i ), session, object
);
//TODO support other entity modes
if ( ! type.isEqual( loadedState[i], snapshotValue, factory ) ) {
if ( factory.getStatistics().isStatisticsEnabled() ) {
factory.getStatisticsImplementor()
.optimisticFailure( getEntityName() );
}
throw new StaleObjectStateException( getEntityName(), id );