EntityComparator
Index
Constructors
Methods
Constructors
constructor
Parameters
metadata: IMetadataStorage
platform: Platform
Returns EntityComparator
Methods
diffEntities
Type parameters
- T
Parameters
entityName: string
a: EntityData<T>
b: EntityData<T>
Returns EntityData<T>
mapResult
Maps database columns to properties.
Type parameters
- T
Parameters
entityName: string
result: EntityDictionary<T>
Returns EntityData<T>
matching
Type parameters
- T
Parameters
entityName: string
a: EntityData<T>
b: EntityData<T>
Returns boolean
prepareEntity
Removes ORM specific code from entities and prepares it for serializing. Used before change set computation. References will be mapped to primary keys, collections to arrays of primary keys.
Type parameters
- T
Parameters
entity: T
Returns EntityData<T>
staticisComparable
perf: used to generate list of comparable properties during discovery, so we speed up the runtime comparison
Type parameters
- T
Parameters
prop: EntityProperty<T, any>
root: EntityMetadata<any>
Returns boolean
Computes difference between two entities.