I know that queries on relations are not supported. But u can select some attributes of a related collection like this
[Query.select([ "$id", "name", "articles.name", "articles.description"])],
This returns me specified attributes but if I add article.$id
it doesnt work. It only works if select only article.$id
.
Is there any way or workaround to fetch id AND some attributes?
TL;DR
Developers want to select specific attributes from a related collection in a query, but including the ID along with other attributes causes issues. A workaround is to select the ID separately from the other attributes, as combining them in the query does not seem to be supported.