I have collection named ServiceFavorite it have two attributes service (have relation with my service collection) and user (have relations with my userProfile collection). Now I have method that getAllFavorites of the particular user. So how can I query that the user is equal to this current user.
Summary
The user is having trouble querying relationships in a database. The current database does not support querying relationships. They have a collection called "ServiceFavorite" that stores favorites of different users and they want to use a query to only get documents owned by the current user. They are wondering if the related items should appear in the results if they fetch the user profile. They also mention that the "ServiceFavorite" collection has attributes "service" (related to the service collection) and "user" (related to the userProfile collection). They ask how they can query to get the favorites of the current user. Unfortunately, no solution is provided in the support
Drake
Sep 25, 2023, 04:05
Shouldn't the related stuff appear in the results if you fetch the user profile?
Mosh Ontong
Rank 5: Hypervisor
Sep 25, 2023, 04:08
I have a ServiceFavorite collection it will store all the favorites of the different users. That is why I want to use Query.equal to get only documents that is owned by the current user