Can not access relation object with 2 many relations
I'm declaring the relations of a table like this:
The reverse relation:
I can make this query:
but when I access
result[0].storeLocations
, it is not suggested and it says Property storeLocations does not exist...
.
But if I do console.info(result[0])
I can see storeLocations
inside the object.
If I remove the other many relation, then it works normally.2 Replies
All relation of the same table have to be declared in the same object.
Also when you have more that one relation with the same table, you need to give each a
relationName
so that drizzle can differentiate them. The name have to match in both sides of the relationThank you so much!. It works now 🙌