From f4c0511d7ae9388752c0753ba57167a5bc852588 Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Mon, 28 Oct 2024 15:16:02 -0600 Subject: [PATCH] Clarify that toJSON returns frozen objects --- docs/technical-details/reference/resource.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/technical-details/reference/resource.md b/docs/technical-details/reference/resource.md index cd2c823..ed1d9cc 100644 --- a/docs/technical-details/reference/resource.md +++ b/docs/technical-details/reference/resource.md @@ -621,7 +621,7 @@ product1.delete('additionalInformation'); product1.update(); ``` -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: +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): ```javascript let product1 = await Product.get(1);