@mikro-orm/core 7.1.15-dev.3 → 7.1.15-dev.5
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 +3 -1
- package/entity/defineEntity.js +1 -1
- package/package.json +1 -1
- package/utils/Utils.js +1 -1
package/entity/defineEntity.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export interface PropertyChain<Value, Options> {
|
|
|
112
112
|
getter(getter?: boolean): PropertyChain<Value, Options>;
|
|
113
113
|
getterName(getterName: string): PropertyChain<Value, Options>;
|
|
114
114
|
serializedPrimaryKey(serializedPrimaryKey?: boolean): PropertyChain<Value, Options>;
|
|
115
|
-
serializer(serializer: (value: Value, options?: SerializeOptions<any>) => any): PropertyChain<Value, Options>;
|
|
115
|
+
serializer(serializer: (value: SerializerValue<Value, Options>, options?: SerializeOptions<any>) => any): PropertyChain<Value, Options>;
|
|
116
116
|
serializedName(serializedName: string): PropertyChain<Value, Options>;
|
|
117
117
|
groups(...groups: string[]): PropertyChain<Value, Options>;
|
|
118
118
|
customOrder(...customOrder: string[] | number[] | boolean[]): PropertyChain<Value, Options>;
|
|
@@ -795,6 +795,8 @@ type InferBuilderValue<Builder> = Builder extends {
|
|
|
795
795
|
type MaybeArray<Value, Options> = Options extends {
|
|
796
796
|
array: true;
|
|
797
797
|
} ? Value[] : Value;
|
|
798
|
+
/** The runtime value passed to a custom serializer — the property value as stored on the entity (e.g. `Collection`/`Ref` for relations). Skips `MaybeMapToPk`, as its `Primary<Value>` branch is too costly for the type checker. */
|
|
799
|
+
type SerializerValue<Value, Options> = MaybeNullable<MaybeRelationRef<MaybeArray<Value, Options>, Options>, Options>;
|
|
798
800
|
type MaybeMapToPk<Value, Options> = Options extends {
|
|
799
801
|
mapToPk: true;
|
|
800
802
|
} ? Primary<Value> : Value;
|
package/entity/defineEntity.js
CHANGED
|
@@ -475,7 +475,7 @@ export class UniversalPropertyOptionsBuilder {
|
|
|
475
475
|
export class OneToManyOptionsBuilderOnlyMappedBy extends UniversalPropertyOptionsBuilder {
|
|
476
476
|
/** Point to the owning side property name. */
|
|
477
477
|
mappedBy(mappedBy) {
|
|
478
|
-
return
|
|
478
|
+
return this.assignOptions({ mappedBy });
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
function createPropertyBuilders(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.1.15-dev.
|
|
3
|
+
"version": "7.1.15-dev.5",
|
|
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.15-dev.
|
|
156
|
+
static #ORM_VERSION = '7.1.15-dev.5';
|
|
157
157
|
/**
|
|
158
158
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
159
159
|
*/
|