Throw exception when setting wrong object in hasOne association