If the property name matches the foreign key name creating a BelongsTo relation triggers an undefined property error. Disabling constraints prevents accessing the property and thus prevents the error.