@mikro-orm/sql
Advanced tools
+2
-2
| { | ||
| "name": "@mikro-orm/sql", | ||
| "version": "7.1.6-dev.13", | ||
| "version": "7.1.6-dev.14", | ||
| "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.", | ||
@@ -56,3 +56,3 @@ "keywords": [ | ||
| "peerDependencies": { | ||
| "@mikro-orm/core": "7.1.6-dev.13" | ||
| "@mikro-orm/core": "7.1.6-dev.14" | ||
| }, | ||
@@ -59,0 +59,0 @@ "engines": { |
@@ -233,2 +233,8 @@ import { ReferenceKind, isRaw, } from '@mikro-orm/core'; | ||
| const columnName = check.property ? meta.properties[check.property].fieldNames[0] : undefined; | ||
| // In TPT, inherited columns live on the parent table only, so a check | ||
| // that references such a column must not be emitted onto the child | ||
| // table, where that column does not exist. | ||
| if (meta.inheritanceType === 'tpt' && meta.tptParent && columnName && !table.hasColumn(columnName)) { | ||
| continue; | ||
| } | ||
| const expression = isRaw(check.expression) | ||
@@ -235,0 +241,0 @@ ? platform.formatQuery(check.expression.sql, check.expression.params) |
1050591
0.04%21983
0.03%