@ronin/compiler 0.11.4-leo-ron-1083-experimental-241 → 0.11.4-leo-ron-1083-experimental-243
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 +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -658,7 +658,8 @@ var getFieldStatement = (models, model, field) => {
|
|
658
658
|
if (field.type === "link") {
|
659
659
|
if (field.kind === "many") return null;
|
660
660
|
const actions = field.actions || {};
|
661
|
-
const
|
661
|
+
const modelList = models.some((item) => item.slug === model.slug) ? models : [...models, model];
|
662
|
+
const targetTable = getModelBySlug(modelList, field.target).table;
|
662
663
|
statement += ` REFERENCES ${targetTable}("id")`;
|
663
664
|
for (const trigger in actions) {
|
664
665
|
const triggerName = trigger.toUpperCase().slice(2);
|
package/package.json
CHANGED