I have 3 important tables
#Vehicles ( Model Vehicle )
- Id
- Name
- Description
#FilterOptions ( Model FilterOptions )
- Id
- GroupId
- Name
- Value
#VehicleTags ( Model VehicleTag )
- Id
- fId (Is linked to table FilterOptions)
- vehicleId
I want to select a sepecific vehicle with id 1, that is not the hard part for me but im struggeling to get the following.
I also want to get all the filterOptions that a vehicle has.
The relation for that is a vehicle has multiple vehicleTags and a vehicleTag has one FilterOption.
How can i achieve something like this
vehicle: {
id: 1,
filterOptions: {
// ....
}
}
Any help or suggestions are welcome!
If u need any more details let me know!