You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@mikro-orm/sql

Package Overview
Dependencies
Maintainers
1
Versions
309
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mikro-orm/sql - npm Package Compare versions

Comparing version
7.0.0-dev.199
to
7.0.0-dev.200
+2
-2
package.json
{
"name": "@mikro-orm/sql",
"version": "7.0.0-dev.199",
"version": "7.0.0-dev.200",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",

@@ -59,4 +59,4 @@ "type": "module",

"peerDependencies": {
"@mikro-orm/core": "7.0.0-dev.199"
"@mikro-orm/core": "7.0.0-dev.200"
}
}

@@ -484,7 +484,15 @@ import { DecimalType, EntitySchema, RawQueryFragment, ReferenceKind, t, Type, UnknownType, Utils, } from '@mikro-orm/core';

}
if (!fks.some(fk => fk !== currentFk && fk.referencedTableName === currentFk.referencedTableName) && !this.getColumn(currentFk.referencedTableName)) {
// FK is the only one in this table that references this other table.
// Strip schema prefix from referenced table name (e.g., "public.fr_usuario" -> "fr_usuario")
const getTableName = (fullName) => {
const parts = fullName.split('.');
return parts[parts.length - 1];
};
const referencedTableName = getTableName(currentFk.referencedTableName);
// Check for conflicts using stripped table names (handles cross-schema FKs to same-named tables)
const hasConflictingFk = fks.some(fk => fk !== currentFk && getTableName(fk.referencedTableName) === referencedTableName);
if (!hasConflictingFk && !this.getColumn(referencedTableName)) {
// FK is the only one in this table that references a table with this name.
// The name of the referenced table is not shared with a column in this table,
// so it is safe to output prop name based on the referenced entity.
return currentFk.referencedTableName;
return referencedTableName;
}

@@ -491,0 +499,0 @@ // Any ambiguous FK is rendered with a name based on the FK constraint name

Sorry, the diff of this file is not supported yet