You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduces methods to disable, enable, and check autofetch on Parse objects, and adds UnfetchedFieldAccessError for unfetched field access when autofetch is disabled. Improves partial fetch state management, deepens nested key parsing, and adds extensive unit tests for partial fetch functionality.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,23 @@
16
16
-**IMPROVED**: Before-save hooks can now reliably access unfetched fields (triggers autofetch)
17
17
-**IMPROVED**: Saving partially fetched objects only updates actually changed fields, not default values
18
18
19
+
#### Code Quality & Security Improvements
20
+
-**NEW**: `disable_autofetch!` method to prevent automatic network requests on an instance
21
+
-**NEW**: `enable_autofetch!` method to re-enable autofetch
22
+
-**NEW**: `autofetch_disabled?` method to check if autofetch is disabled
23
+
-**NEW**: `clear_partial_fetch_state!` public method for clearing partial fetch tracking
24
+
-**NEW**: `Parse::UnfetchedFieldAccessError` raised when accessing unfetched fields with autofetch disabled
25
+
-**FIXED**: Inconsistent state in `build` - both `nested_fetched_keys` and `fetched_keys` now set before `initialize`
26
+
-**FIXED**: Deep nesting support - `parse_includes_to_nested_keys` now handles arbitrary depth (e.g., `a.b.c.d`)
27
+
-**FIXED**: String/symbol mismatch in `field_was_fetched?` - remote_key now converted to symbol
28
+
-**IMPROVED**: `fetched_keys` getter returns frozen duplicate to prevent external mutation
29
+
-**IMPROVED**: Autofetch prevented during `apply_defaults!` when object is partially fetched
30
+
-**IMPROVED**: Info-level logging when autofetch is triggered (shows class, id, and field that triggered fetch)
31
+
32
+
#### Testing
33
+
-**NEW**: 34 unit tests for partial fetch functionality (no Docker required)
34
+
-**NEW**: 18 integration tests for partial fetch with real Parse Server
35
+
19
36
### 2.0.9
20
37
21
38
-**FIXED**: `Query#where` method now routes through `conditions` to properly handle special keywords like `keys:`, `include:`, `limit:`, etc. when chaining (e.g., `Model.query.where(keys: [...])`)
0 commit comments