@statezero/core 0.1.82 → 0.1.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -163,6 +163,16 @@ export class QuerysetStoreRegistry {
163
163
  this.addFollowingQueryset(semanticKey, queryset);
164
164
  return this._stores.get(semanticKey);
165
165
  }
166
+ // Check if any parent in the chain has a temp store with the same semantic key
167
+ // This ensures that materialized querysets (created via fetch/create/etc) share
168
+ // the same store as their parent queryset when they have the same semantic key
169
+ let current = queryset.__parent;
170
+ while (current) {
171
+ if (this._tempStores.has(current) && current.semanticKey === semanticKey) {
172
+ return this._tempStores.get(current);
173
+ }
174
+ current = current.__parent;
175
+ }
166
176
  // Create a new temporary store
167
177
  const fetchQueryset = async ({ ast, modelClass }) => {
168
178
  // Directly assemble the request and call the API to avoid recursive logic from the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "type": "module",
5
5
  "module": "ESNext",
6
6
  "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",