@statezero/core 0.1.81 → 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.
|
@@ -548,7 +548,7 @@ export class QuerySet {
|
|
|
548
548
|
if (node.type === "search") {
|
|
549
549
|
searchData = {
|
|
550
550
|
searchQuery: node.searchQuery || "",
|
|
551
|
-
searchFields: node.searchFields
|
|
551
|
+
searchFields: node.searchFields || this.ModelClass.schema.searchable_fields
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
554
|
else {
|
|
@@ -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