Hey guys,
I'm going crazy because of a simple issue.
I've got a collection of accommodations and a collection of amenities.
The accommodations have a relationship field to amenities with hasMany: true.
I'm using the LocalAPI.
I'm just trying to query accommodations that have every selected amenities, and not one of them. I've tried many types of query, but I still don't have the excepted result.
For example:
- first acoommodation has: wifi, king size bed and private spa
- second accommodation has: wifi, king size bed and TV
- third accommodation has: wifi, TV and air conditionning
I want to query accommodations with wifi AND king size bed, so the first and second accommodations
Can anyone explain how to query relationship fields to achieve this type of results ?
Thanks ๐