@mikro-orm/core 7.2.2-dev.24 → 7.2.2-dev.25
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/package.json +1 -1
- package/utils/QueryHelper.js +2 -1
- package/utils/Utils.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.2.2-dev.
|
|
3
|
+
"version": "7.2.2-dev.25",
|
|
4
4
|
"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.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
package/utils/QueryHelper.js
CHANGED
|
@@ -166,9 +166,10 @@ export class QueryHelper {
|
|
|
166
166
|
// The criteria layer would otherwise emit a malformed predicate such as
|
|
167
167
|
// `(joinCol1, joinCol2) = scalar`. Limited to owning relations — `joinColumns` on the
|
|
168
168
|
// inverse side (1:m) describes the owning entity's FK columns, not the LHS tuple.
|
|
169
|
+
// Polymorphic relations are skipped too, a scalar would be compared to the discriminator column.
|
|
169
170
|
if (prop?.owner &&
|
|
170
171
|
[ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) &&
|
|
171
|
-
prop.joinColumns.length !== meta2.primaryKeys.length) {
|
|
172
|
+
(prop.polymorphic || prop.joinColumns.length !== meta2.primaryKeys.length)) {
|
|
172
173
|
return;
|
|
173
174
|
}
|
|
174
175
|
where[k] = Utils.getPrimaryKeyValues(where[k], meta2, true);
|
package/utils/Utils.js
CHANGED
|
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
|
|
|
153
153
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
154
154
|
export class Utils {
|
|
155
155
|
static PK_SEPARATOR = '~~~';
|
|
156
|
-
static #ORM_VERSION = '7.2.2-dev.
|
|
156
|
+
static #ORM_VERSION = '7.2.2-dev.25';
|
|
157
157
|
/** Default session variable name backing an RLS filter argument (`current_setting('mikro.<filter>.<arg>')`). */
|
|
158
158
|
static getRlsSettingName(filterName, argName) {
|
|
159
159
|
return `mikro.${filterName}.${argName}`;
|