hasOne relation fix