@mikro-orm/sql 7.1.0-dev.12 → 7.1.0-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/package.json +2 -2
- package/query/CriteriaNode.d.ts +1 -1
- package/query/CriteriaNode.js +2 -2
- package/query/ObjectCriteriaNode.js +1 -1
- package/typings.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/sql",
|
|
3
|
-
"version": "7.1.0-dev.
|
|
3
|
+
"version": "7.1.0-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",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@mikro-orm/core": "^7.0.11"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@mikro-orm/core": "7.1.0-dev.
|
|
56
|
+
"@mikro-orm/core": "7.1.0-dev.14"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">= 22.17.0"
|
package/query/CriteriaNode.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class CriteriaNode<T extends object> implements ICriteriaNode<T>
|
|
|
21
21
|
shouldInline(payload: any): boolean;
|
|
22
22
|
willAutoJoin(qb: IQueryBuilder<T>, alias?: string, options?: ICriteriaNodeProcessOptions): boolean;
|
|
23
23
|
shouldRename(payload: any): boolean;
|
|
24
|
-
renameFieldToPK<T>(qb: IQueryBuilder<T>, ownerAlias?: string): string;
|
|
24
|
+
renameFieldToPK<T>(qb: IQueryBuilder<T>, ownerAlias?: string, options?: ICriteriaNodeProcessOptions): string;
|
|
25
25
|
getPath(opts?: {
|
|
26
26
|
addIndex?: boolean;
|
|
27
27
|
parentPath?: string;
|
package/query/CriteriaNode.js
CHANGED
|
@@ -83,8 +83,8 @@ export class CriteriaNode {
|
|
|
83
83
|
return false;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
renameFieldToPK(qb, ownerAlias) {
|
|
87
|
-
const joinAlias = qb.getAliasForJoinPath(this.getPath(), { matchPopulateJoins: true });
|
|
86
|
+
renameFieldToPK(qb, ownerAlias, options) {
|
|
87
|
+
const joinAlias = qb.getAliasForJoinPath(this.getPath(), { ...options, matchPopulateJoins: true });
|
|
88
88
|
if (!joinAlias &&
|
|
89
89
|
this.parent &&
|
|
90
90
|
[ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(this.prop.kind) &&
|
|
@@ -105,7 +105,7 @@ export class ObjectCriteriaNode extends CriteriaNode {
|
|
|
105
105
|
this.inlineChildPayload(o, payload, field, a, childAlias);
|
|
106
106
|
}
|
|
107
107
|
else if (childNode.shouldRename(payload)) {
|
|
108
|
-
this.inlineCondition(childNode.renameFieldToPK(qb, alias), o, payload);
|
|
108
|
+
this.inlineCondition(childNode.renameFieldToPK(qb, alias, options), o, payload);
|
|
109
109
|
}
|
|
110
110
|
else if (isRawField) {
|
|
111
111
|
const rawField = RawQueryFragment.getKnownFragment(field);
|
package/typings.d.ts
CHANGED
|
@@ -246,7 +246,7 @@ export interface ICriteriaNode<T extends object> {
|
|
|
246
246
|
shouldInline(payload: any): boolean;
|
|
247
247
|
willAutoJoin(qb: IQueryBuilder<T>, alias?: string, options?: ICriteriaNodeProcessOptions): boolean;
|
|
248
248
|
shouldRename(payload: any): boolean;
|
|
249
|
-
renameFieldToPK<T>(qb: IQueryBuilder<T>, ownerAlias?: string): string;
|
|
249
|
+
renameFieldToPK<T>(qb: IQueryBuilder<T>, ownerAlias?: string, options?: ICriteriaNodeProcessOptions): string;
|
|
250
250
|
getPath(opts?: {
|
|
251
251
|
addIndex?: boolean;
|
|
252
252
|
}): string;
|