Ahh yeah, my bad, you are right, that was the schema.
I had done a query on products and had included ProductCategory, then on the Product I’d call toJSON()
.
Here’s the JSON of my product.
{
"className": "Products",
"Name": "Test Name",
"Active": false,
"IsSample": false,
"createdAt": "2021-10-18T23:15:05.457Z",
"updatedAt": "2022-01-04T18:54:49.700Z",
"objectId": "EI3Cy9aFcg",
"Quantity": 939,
"SalesPrice": 500,
"ProductCategory": {
"Name": "Test Category",
"Type": "Test Type",
"createdAt": "2019-05-31T20:34:19.477Z",
"updatedAt": "2020-03-04T22:22:53.317Z",
"ACL": {
"role:ProductTypesRead": {
"read": true
},
"role:ProductTypesWrite": {
"read": true,
"write": true
}
},
"objectId": "blBO4uSJSo"
},
"Store": {
"__type": "Pointer",
"className": "Stores",
"objectId": "ZpiYbRa5pC"
},
"ACL": {
"role:ProductsRead": {
"read": true
},
"role:ProductsWrite": {
"read": true,
"write": true
}
}
}
One thing too, I didn’t include my Store
in my product query, so that’s how my store object was populated, but when I call Parse.Object.fromJSON()
on the product, that store gets populated and works like a Parse.Object
like the product does, but the ProductCategory(s) attributes are empty.
Thanks for the assistance.