@zuzjs/orm 0.3.2 → 0.3.3

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.
@@ -210,7 +210,7 @@ class MySqlDriver {
210
210
  if (foreignKeys[tableName]) {
211
211
  for (const fk of foreignKeys[tableName] || []) {
212
212
  const relatedEntity = (0, index_js_1.toPascalCase)(fk.REFERENCED_TABLE_NAME);
213
- if (entityCode.includes(`fk${relatedEntity}!: ${relatedEntity};`) === false) {
213
+ if (imports.includes(`import { ${relatedEntity} } from "./${fk.REFERENCED_TABLE_NAME}";`) === false) {
214
214
  entityCode.push(`\t@OneToOne(() => ${relatedEntity})`);
215
215
  entityCode.push(`\t@JoinColumn({ name: "${fk.COLUMN_NAME}" })`);
216
216
  entityCode.push(`\tfk${relatedEntity}!: ${relatedEntity};\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuzjs/orm",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "keywords": [
5
5
  "orm",
6
6
  "zuz",