}
else if ( type.isAnyType() ) {
return isNullifiable(null, value) ? null : value;
}
else if ( type.isComponentType() ) {
CompositeType actype = (CompositeType) type;
Object[] subvalues = actype.getPropertyValues(value, session);
Type[] subtypes = actype.getSubtypes();
boolean substitute = false;
for ( int i = 0; i < subvalues.length; i++ ) {
Object replacement = nullifyTransientReferences( subvalues[i], subtypes[i] );
if ( replacement != subvalues[i] ) {
substitute = true;
subvalues[i] = replacement;
}
}
if ( substitute ) {
// todo : need to account for entity mode on the CompositeType interface :(
actype.setPropertyValues( value, subvalues, EntityMode.POJO );
}
return value;
}
else {
return value;