@mikro-orm/knex 6.5.9-dev.0 → 6.5.9-dev.10
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/index.mjs +2 -8
- package/package.json +2 -2
- package/query/ObjectCriteriaNode.js +1 -1
- package/query/QueryBuilderHelper.js +2 -2
package/index.mjs
CHANGED
|
@@ -68,7 +68,6 @@ export const DriverException = mod.DriverException;
|
|
|
68
68
|
export const EagerProps = mod.EagerProps;
|
|
69
69
|
export const Embeddable = mod.Embeddable;
|
|
70
70
|
export const Embedded = mod.Embedded;
|
|
71
|
-
export const EmbeddedOptionsBuilder = mod.EmbeddedOptionsBuilder;
|
|
72
71
|
export const EnsureRequestContext = mod.EnsureRequestContext;
|
|
73
72
|
export const Entity = mod.Entity;
|
|
74
73
|
export const EntityAssigner = mod.EntityAssigner;
|
|
@@ -89,7 +88,6 @@ export const EntityTransformer = mod.EntityTransformer;
|
|
|
89
88
|
export const EntityValidator = mod.EntityValidator;
|
|
90
89
|
export const Enum = mod.Enum;
|
|
91
90
|
export const EnumArrayType = mod.EnumArrayType;
|
|
92
|
-
export const EnumOptionsBuilder = mod.EnumOptionsBuilder;
|
|
93
91
|
export const EnumType = mod.EnumType;
|
|
94
92
|
export const EventManager = mod.EventManager;
|
|
95
93
|
export const EventType = mod.EventType;
|
|
@@ -122,9 +120,7 @@ export const LoadStrategy = mod.LoadStrategy;
|
|
|
122
120
|
export const LockMode = mod.LockMode;
|
|
123
121
|
export const LockWaitTimeoutException = mod.LockWaitTimeoutException;
|
|
124
122
|
export const ManyToMany = mod.ManyToMany;
|
|
125
|
-
export const ManyToManyOptionsBuilder = mod.ManyToManyOptionsBuilder;
|
|
126
123
|
export const ManyToOne = mod.ManyToOne;
|
|
127
|
-
export const ManyToOneOptionsBuilder = mod.ManyToOneOptionsBuilder;
|
|
128
124
|
export const MariaDbKnexDialect = mod.MariaDbKnexDialect;
|
|
129
125
|
export const MediumIntType = mod.MediumIntType;
|
|
130
126
|
export const MemoryCacheAdapter = mod.MemoryCacheAdapter;
|
|
@@ -154,10 +150,8 @@ export const ObjectHydrator = mod.ObjectHydrator;
|
|
|
154
150
|
export const OnInit = mod.OnInit;
|
|
155
151
|
export const OnLoad = mod.OnLoad;
|
|
156
152
|
export const OneToMany = mod.OneToMany;
|
|
157
|
-
export const OneToManyOptionsBuilder = mod.OneToManyOptionsBuilder;
|
|
158
153
|
export const OneToManyOptionsBuilderOnlyMappedBy = mod.OneToManyOptionsBuilderOnlyMappedBy;
|
|
159
154
|
export const OneToOne = mod.OneToOne;
|
|
160
|
-
export const OneToOneOptionsBuilder = mod.OneToOneOptionsBuilder;
|
|
161
155
|
export const Opt = mod.Opt;
|
|
162
156
|
export const OptimisticLockError = mod.OptimisticLockError;
|
|
163
157
|
export const OptionalProps = mod.OptionalProps;
|
|
@@ -169,7 +163,6 @@ export const PostgreSqlKnexDialect = mod.PostgreSqlKnexDialect;
|
|
|
169
163
|
export const PrimaryKey = mod.PrimaryKey;
|
|
170
164
|
export const PrimaryKeyProp = mod.PrimaryKeyProp;
|
|
171
165
|
export const Property = mod.Property;
|
|
172
|
-
export const PropertyOptionsBuilder = mod.PropertyOptionsBuilder;
|
|
173
166
|
export const QueryBuilder = mod.QueryBuilder;
|
|
174
167
|
export const QueryBuilderHelper = mod.QueryBuilderHelper;
|
|
175
168
|
export const QueryFlag = mod.QueryFlag;
|
|
@@ -183,7 +176,6 @@ export const ReadOnlyException = mod.ReadOnlyException;
|
|
|
183
176
|
export const Ref = mod.Ref;
|
|
184
177
|
export const Reference = mod.Reference;
|
|
185
178
|
export const ReferenceKind = mod.ReferenceKind;
|
|
186
|
-
export const ReferenceOptionsBuilder = mod.ReferenceOptionsBuilder;
|
|
187
179
|
export const ReflectMetadataProvider = mod.ReflectMetadataProvider;
|
|
188
180
|
export const RequestContext = mod.RequestContext;
|
|
189
181
|
export const RequiredNullable = mod.RequiredNullable;
|
|
@@ -222,6 +214,7 @@ export const UnderscoreNamingStrategy = mod.UnderscoreNamingStrategy;
|
|
|
222
214
|
export const Unique = mod.Unique;
|
|
223
215
|
export const UniqueConstraintViolationException = mod.UniqueConstraintViolationException;
|
|
224
216
|
export const UnitOfWork = mod.UnitOfWork;
|
|
217
|
+
export const UniversalPropertyOptionsBuilder = mod.UniversalPropertyOptionsBuilder;
|
|
225
218
|
export const UnknownType = mod.UnknownType;
|
|
226
219
|
export const Utils = mod.Utils;
|
|
227
220
|
export const UuidType = mod.UuidType;
|
|
@@ -244,6 +237,7 @@ export const getOnConflictReturningFields = mod.getOnConflictReturningFields;
|
|
|
244
237
|
export const getWhereCondition = mod.getWhereCondition;
|
|
245
238
|
export const helper = mod.helper;
|
|
246
239
|
export const knex = mod.knex;
|
|
240
|
+
export const p = mod.p;
|
|
247
241
|
export const parseJsonSafe = mod.parseJsonSafe;
|
|
248
242
|
export const quote = mod.quote;
|
|
249
243
|
export const raw = mod.raw;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.5.9-dev.
|
|
3
|
+
"version": "6.5.9-dev.10",
|
|
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
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.5.8"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.5.9-dev.
|
|
69
|
+
"@mikro-orm/core": "6.5.9-dev.10",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|
|
@@ -79,7 +79,7 @@ class QueryBuilderHelper {
|
|
|
79
79
|
if (prop?.name === a && prop.embeddedProps[f]) {
|
|
80
80
|
return this.alias + '.' + prop.fieldNames[fkIdx];
|
|
81
81
|
}
|
|
82
|
-
const noPrefix = prop
|
|
82
|
+
const noPrefix = prop?.persist === false;
|
|
83
83
|
if (prop?.fieldNameRaw) {
|
|
84
84
|
return this.knex.raw(this.prefix(field, isTableNameAliasRequired));
|
|
85
85
|
}
|
|
@@ -557,7 +557,7 @@ class QueryBuilderHelper {
|
|
|
557
557
|
let [alias, field] = this.splitField(f, true);
|
|
558
558
|
alias = populate[alias] || alias;
|
|
559
559
|
const prop = this.getProperty(field, alias);
|
|
560
|
-
const noPrefix = (prop
|
|
560
|
+
const noPrefix = (prop?.persist === false && !prop.formula && !prop.embedded) || core_1.RawQueryFragment.isKnownFragment(f);
|
|
561
561
|
const column = this.mapper(noPrefix ? field : `${alias}.${field}`, type, undefined, null);
|
|
562
562
|
/* istanbul ignore next */
|
|
563
563
|
const rawColumn = core_1.Utils.isString(column) ? column.split('.').map(e => this.knex.ref(e)).join('.') : column;
|