hasMany and hasOne with relatedTable