This function needs to support `ids` for hasMany and `id` for belongsTo