Which was using the wrong way to fetch the field type and using the association type instead of the column type.