@ronin/compiler 0.14.0-leo-ron-1099-1-experimental-311 → 0.14.0-leo-ron-1099-1-experimental-313
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.
- package/dist/index.js +7 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -473,8 +473,8 @@ var handleSelecting = (models, model, statementParams, single, instructions, opt
|
|
473
473
|
const { fieldSelector } = getFieldFromModel(model, selectedField.slug, {
|
474
474
|
instructionName: "selecting"
|
475
475
|
});
|
476
|
-
if (
|
477
|
-
return `${fieldSelector} as "${
|
476
|
+
if (options.mountingPath) {
|
477
|
+
return `${fieldSelector} as "${options.mountingPath}.${selectedField.slug}"`;
|
478
478
|
}
|
479
479
|
return fieldSelector;
|
480
480
|
});
|
@@ -1944,13 +1944,11 @@ var Transaction = class {
|
|
1944
1944
|
records.push(record);
|
1945
1945
|
continue;
|
1946
1946
|
}
|
1947
|
-
const joinFields = fields.reduce(
|
1948
|
-
(acc
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
);
|
1953
|
-
for (const arrayField of joinFields) {
|
1947
|
+
const joinFields = fields.reduce((acc, { mountingPath }) => {
|
1948
|
+
if (mountingPath.includes("[0]")) acc.add(mountingPath.split("[0]")[0]);
|
1949
|
+
return acc;
|
1950
|
+
}, /* @__PURE__ */ new Set());
|
1951
|
+
for (const arrayField of joinFields.values()) {
|
1954
1952
|
const currentValue = existingRecord[arrayField];
|
1955
1953
|
const newValue = record[arrayField];
|
1956
1954
|
currentValue.push(...newValue);
|
package/package.json
CHANGED