This is what I have so far:
wixData.query(“player”)
.eq(“child_id”, child_id)
.include(“Games”)
.find()
.then( (results) => {
if (results.items.length > 0) {
let games = results.items;
let firstGame = games[0];
console.log(firstGame);
//let firstAuthor = firstBook.author;
//let firstAuthorBio = firstAuthor.bio;
//let firstPublisher = firstBook.publisher.name;
} else {
// handle case where no matching items found
console.log(“oh no! found no results”);
}
} )
but I get the following:
Included Games field does not exist in schema. ‘Games’ does have a team_id reference that is also in ‘player’