I have tried following the documentation for relational data up until the point where i try to query the relations, and when i try to console.log(list) nothing happens? here is a code snippet:
relation.query().find({
success: function (list) {
// list contains the posts that the current user likes.
console.log(list);
}
});
all other code is exactly as per documentation (https://docs.moralis.io/objects#relational-data) so i dont want to repeat it here.
I would have expected the console.log(list) to return an object with all the relations in it, but literally nothing shows up on the console.
Would be good to get some help on this as im trying to query all posts that were created by a user.
Im using a work around at the moment where every post created points to the post creator, but it seems relational data should be able to do this as well so id prefer to do it the relational data way.
but if not ill can just keep doing it the way im currently doing it.
any help would be appreciated. thanks.