@mikro-orm/core 7.1.2-dev.0 → 7.1.2-dev.2
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 +5 -2
- package/package.json +1 -1
- package/utils/Utils.js +1 -1
package/entity/defineEntity.d.ts
CHANGED
|
@@ -614,6 +614,9 @@ export type PropertyBuilders = {
|
|
|
614
614
|
};
|
|
615
615
|
/** Own keys + base entity keys (when TBase is not `never`). Guards against `keyof never = string | number | symbol`. */
|
|
616
616
|
type AllKeys<TProperties, TBase> = keyof TProperties | (IsNever<TBase> extends true ? never : keyof TBase);
|
|
617
|
+
type PartialWhere<TProperties, TBase> = string | FilterQuery<{
|
|
618
|
+
[K in AllKeys<TProperties, TBase> & string]?: unknown;
|
|
619
|
+
}>;
|
|
617
620
|
/** Metadata descriptor for `defineEntity()`, combining entity options with property definitions. */
|
|
618
621
|
export interface EntityMetadataWithProperties<TName extends string, TTableName extends string, TProperties extends Record<string, any>, TPK extends (keyof TProperties)[] | undefined = undefined, TBase = never, TRepository = never, TForceObject extends boolean = false, TDiscriminatorColumn extends string | undefined = undefined, TDiscriminatorValue extends string | number | undefined = undefined, TBaseDiscriminatorColumn extends string | undefined = undefined> extends Omit<Partial<EntityMetadata<InferEntityFromProperties<TProperties, TPK, TBase, TRepository>>>, 'properties' | 'extends' | 'primaryKeys' | 'hooks' | 'discriminator' | 'discriminatorColumn' | 'discriminatorValue' | 'versionProperty' | 'concurrencyCheckKeys' | 'serializedPrimaryKey' | 'indexes' | 'uniques' | 'triggers' | 'repository' | 'filters' | 'orderBy'> {
|
|
619
622
|
name: TName;
|
|
@@ -656,7 +659,7 @@ export interface EntityMetadataWithProperties<TName extends string, TTableName e
|
|
|
656
659
|
type?: string;
|
|
657
660
|
options?: Dictionary;
|
|
658
661
|
expression?: string | IndexCallback<InferEntityFromProperties<TProperties, TPK, TBase>>;
|
|
659
|
-
where?:
|
|
662
|
+
where?: PartialWhere<TProperties, TBase>;
|
|
660
663
|
columns?: IndexColumnOptions[];
|
|
661
664
|
include?: NoInfer<AllKeys<TProperties, TBase>> | NoInfer<AllKeys<TProperties, TBase>>[];
|
|
662
665
|
fillFactor?: number;
|
|
@@ -669,7 +672,7 @@ export interface EntityMetadataWithProperties<TName extends string, TTableName e
|
|
|
669
672
|
name?: string;
|
|
670
673
|
options?: Dictionary;
|
|
671
674
|
expression?: string | IndexCallback<InferEntityFromProperties<TProperties, TPK, TBase>>;
|
|
672
|
-
where?:
|
|
675
|
+
where?: PartialWhere<TProperties, TBase>;
|
|
673
676
|
deferMode?: DeferMode | `${DeferMode}`;
|
|
674
677
|
columns?: IndexColumnOptions[];
|
|
675
678
|
include?: NoInfer<AllKeys<TProperties, TBase>> | NoInfer<AllKeys<TProperties, TBase>>[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.1.2-dev.
|
|
3
|
+
"version": "7.1.2-dev.2",
|
|
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.1.2-dev.
|
|
144
|
+
static #ORM_VERSION = '7.1.2-dev.2';
|
|
145
145
|
/**
|
|
146
146
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
147
147
|
*/
|