use read_attribute_before_type_cast