I added a field collection to the user 'manage field' page, the field machine name is 'houses'. The user may add as many home he want.
This field collection regroup :
- a sample text plain field (the name of the house), the machine name "house_name"
- a sample integer field (the size of the house), the machine name "house_size"
In a custom module, I want check if the current user have a house with a size = 4 (if in collection fields, there is a house with "house_size = 4"), how can I do that via the Drupal 8 Query Api ?
I found several example of Drupal "Query API", but nothing with collections fields..
I can use the function load of the class FieldCollectionItem, but I want use a fastest way for get the information I want.
Thanks you :)