@mikro-orm/core 7.1.14-dev.9 → 7.1.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/entity/defineEntity.d.ts +8 -2
- package/package.json +1 -1
- package/utils/Utils.js +1 -1
package/entity/defineEntity.d.ts
CHANGED
|
@@ -760,9 +760,15 @@ type NarrowDiscriminator<Base, DiscColumn extends string | undefined, DiscValue,
|
|
|
760
760
|
[OptionalProps]?: DiscColumn | ExtractOptionalProps<Base>;
|
|
761
761
|
} : Base : Base : Base;
|
|
762
762
|
type InferCombinedPrimaryKey<Properties extends Record<string, any>, PK, Base> = PK extends undefined ? CombinePrimaryKeys<InferPrimaryKey<Properties>, ExtractBasePrimaryKey<Base>> : PK;
|
|
763
|
-
type ExtractBasePrimaryKey<Base> = Base extends {
|
|
763
|
+
type ExtractBasePrimaryKey<Base> = typeof PrimaryKeyProp extends keyof Base ? Base extends {
|
|
764
764
|
[PrimaryKeyProp]?: infer BasePK;
|
|
765
|
-
} ? BasePK : never
|
|
765
|
+
} ? BasePK : never : [keyof Base] extends [never] ? never : Base extends {
|
|
766
|
+
_id?: any;
|
|
767
|
+
} ? '_id' : Base extends {
|
|
768
|
+
id?: any;
|
|
769
|
+
} ? 'id' : Base extends {
|
|
770
|
+
uuid?: any;
|
|
771
|
+
} ? 'uuid' : never;
|
|
766
772
|
type CombinePrimaryKeys<ChildPK, BasePK> = [ChildPK] extends [never] ? BasePK : [BasePK] extends [never] ? IsUnion<ChildPK> extends true ? ChildPK[] : ChildPK : ChildPK | BasePK;
|
|
767
773
|
/** Extracts the primary key property names from a properties map by finding builders with `primary: true`. */
|
|
768
774
|
export type InferPrimaryKey<Properties extends Record<string, any>> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.1.14
|
|
3
|
+
"version": "7.1.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
|
@@ -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.1.14
|
|
156
|
+
static #ORM_VERSION = '7.1.14';
|
|
157
157
|
/**
|
|
158
158
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
159
159
|
*/
|