@mikro-orm/core 7.0.16-dev.12 → 7.0.16-dev.14
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/EntityManager.js +7 -0
- package/package.json +1 -1
- package/utils/Utils.js +1 -1
package/EntityManager.js
CHANGED
|
@@ -360,6 +360,13 @@ export class EntityManager {
|
|
|
360
360
|
if (!joined && !hint.filter) {
|
|
361
361
|
continue;
|
|
362
362
|
}
|
|
363
|
+
// Polymorphic to-one relations are already filtered via per-target LEFT JOINs created
|
|
364
|
+
// for the `:ref filter` hint; emitting a populate-filter entry here would auto-join only
|
|
365
|
+
// the first target meta and either drop rows pointing to other targets or reference
|
|
366
|
+
// parent-table-only columns on the child sub-table alias for TPT children.
|
|
367
|
+
if (prop.polymorphic && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) {
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
363
370
|
const filters = QueryHelper.mergePropertyFilters(prop.filters, options.filters);
|
|
364
371
|
const where = await this.applyFilters(prop.targetMeta.class, {}, filters, 'read', {
|
|
365
372
|
...options,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.0.16-dev.
|
|
3
|
+
"version": "7.0.16-dev.14",
|
|
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/Utils.js
CHANGED
|
@@ -141,7 +141,7 @@ export function parseJsonSafe(value) {
|
|
|
141
141
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
142
142
|
export class Utils {
|
|
143
143
|
static PK_SEPARATOR = '~~~';
|
|
144
|
-
static #ORM_VERSION = '7.0.16-dev.
|
|
144
|
+
static #ORM_VERSION = '7.0.16-dev.14';
|
|
145
145
|
/**
|
|
146
146
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
147
147
|
*/
|