@ronin/compiler 0.11.1-leo-ron-1083-experimental-229 → 0.11.2-leo-ron-1083-experimental-232
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -643,7 +643,7 @@ var getFieldStatement = (models, model, field) => {
|
|
643
643
|
if (field.unique === true) statement += " UNIQUE";
|
644
644
|
if (field.required === true) statement += " NOT NULL";
|
645
645
|
if (typeof field.defaultValue !== "undefined")
|
646
|
-
statement += ` DEFAULT ${field.defaultValue}`;
|
646
|
+
statement += ` DEFAULT ${typeof field.defaultValue === "string" ? `'${field.defaultValue}'` : field.defaultValue}`;
|
647
647
|
if (field.collation) statement += ` COLLATE ${field.collation}`;
|
648
648
|
if (field.increment === true) statement += " AUTOINCREMENT";
|
649
649
|
if (typeof field.check !== "undefined") {
|
@@ -1256,7 +1256,7 @@ var handleSelecting = (models, model, statementParams, instructions, options) =>
|
|
1256
1256
|
}
|
1257
1257
|
const expandColumns = isJoining && options?.expandColumns;
|
1258
1258
|
if (expandColumns) {
|
1259
|
-
instructions.selecting = model.fields.map((field) => field.slug);
|
1259
|
+
instructions.selecting = model.fields.filter((field) => !(field.type === "link" && field.kind === "many")).map((field) => field.slug);
|
1260
1260
|
}
|
1261
1261
|
if (instructions.selecting) {
|
1262
1262
|
const usableModel = expandColumns ? { ...model, tableAlias: model.tableAlias || model.table } : model;
|
package/package.json
CHANGED