@dbml/core
Advanced tools
Comparing version 3.9.0 to 3.9.1
@@ -223,5 +223,7 @@ "use strict"; | ||
var ref = model.refs[refId]; | ||
var refEndpointIndex = ref.endpointIds.findIndex(function (endpointId) { | ||
var oneRelationEndpointIndex = ref.endpointIds.findIndex(function (endpointId) { | ||
return model.endpoints[endpointId].relation === '1'; | ||
}); | ||
var isManyToMany = oneRelationEndpointIndex === -1; | ||
var refEndpointIndex = isManyToMany ? 0 : oneRelationEndpointIndex; | ||
var foreignEndpointId = ref.endpointIds[1 - refEndpointIndex]; | ||
@@ -245,3 +247,3 @@ var refEndpointId = ref.endpointIds[refEndpointIndex]; | ||
var foreignEndpointFieldName = _this2.buildFieldName(foreignEndpoint.fieldIds, model, 'dbml'); | ||
if (foreignEndpoint.relation === '1') line += '- ';else line += '< '; | ||
if (isManyToMany) line += '<> ';else if (foreignEndpoint.relation === '1') line += '- ';else line += '< '; | ||
line += "".concat((0, _utils.shouldPrintSchema)(foreignEndpointSchema, model) ? "\"".concat(foreignEndpointSchema.name, "\".") : '', "\"").concat(foreignEndpointTable.name, "\".").concat(foreignEndpointFieldName); | ||
@@ -248,0 +250,0 @@ var refActions = []; |
{ | ||
"name": "@dbml/core", | ||
"version": "3.9.0", | ||
"version": "3.9.1", | ||
"description": "> TODO: description", | ||
@@ -35,3 +35,3 @@ "author": "Holistics <dev@holistics.io>", | ||
"dependencies": { | ||
"@dbml/parse": "^3.9.0", | ||
"@dbml/parse": "^3.9.1", | ||
"antlr4": "^4.13.1", | ||
@@ -63,3 +63,3 @@ "lodash": "^4.17.15", | ||
}, | ||
"gitHead": "d40aaa3827853d17fa385aa27ae1e099c9234e4b", | ||
"gitHead": "8494c278b97347945cf3b71d6f75cd658dbae85d", | ||
"engines": { | ||
@@ -66,0 +66,0 @@ "node": ">=16" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13703863
49049
Updated@dbml/parse@^3.9.1