In my database I am storing objects with pointers to other pointers
Iβm fetching the parent objects using a pipeline:
let pipeline = [
{
project: {
chain: 1,
nft: 1,
objectId: 0,
...
},
},
];
I was expecting that I could fetch attributes of the nested Object like this:
res.nft.get("metadata");
But it seems like only the id
is accessible, so I have to fetch attributes of the nested object like this:
const query = new Moralis.Query("NFT");
const nft = await query.get(res.nft.id);
nft.get("metadata");
Logging both objects also confirms that they seem to be different:
console.log(res.nft);
console.log(nft);
Is it possible to somehow retrieve attributes of nested Objects without having to query again?