File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,14 @@ myObject.fetch().then((myObject) => {
217217});
218218```
219219
220+ If you need to check if an object has been fetched, you can call the ` isDataAvailable() ` method:
221+
222+ ``` javascript
223+ if (! myObject .isDataAvailable ()) {
224+ await myObject .fetch ();
225+ }
226+ ```
227+
220228## Updating Objects
221229
222230Updating an object is simple. Just set some new data on it and call the save method. For example:
Original file line number Diff line number Diff line change @@ -83,6 +83,14 @@ If you need to refresh an object you already have with the latest data that
8383$gameScore->fetch();
8484```
8585
86+ If you need to check if an object has been fetched, you can call the ` isDataAvailable() ` method:
87+
88+ ``` php
89+ if (!$gameScore->isDataAvailable()) {
90+ $gameScore->fetch();
91+ }
92+ ```
93+
8694## Updating Objects
8795
8896Updating an object is simple. Just set some new data on it and call the save method. For example:
You can’t perform that action at this time.
0 commit comments