Skip to content

Commit f4c0511

Browse files
committed
Clarify that toJSON returns frozen objects
1 parent 2efc6ba commit f4c0511

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/technical-details/reference/resource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ product1.delete('additionalInformation');
621621
product1.update();
622622
```
623623
624-
You can also get "plain" object representation of a resource instance by calling `toJSON`, which will return a simple object with all the properties (whether defined in the schema) as direct normal properties:
624+
You can also get "plain" object representation of a resource instance by calling `toJSON`, which will return a simple frozen object with all the properties (whether defined in the schema) as direct normal properties (note that this object can *not* be modified, it is frozen since it is belongs to a cache):
625625
626626
```javascript
627627
let product1 = await Product.get(1);

0 commit comments

Comments
 (0)