diff --git a/src/entity-manager/EntityManager.ts b/src/entity-manager/EntityManager.ts index d846df1e43..bb9979fa7b 100644 --- a/src/entity-manager/EntityManager.ts +++ b/src/entity-manager/EntityManager.ts @@ -309,7 +309,7 @@ export class EntityManager { } /** - * Creates a new entity from the given plan javascript object. If entity already exist in the database, then + * Creates a new entity from the given plain javascript object. If entity already exist in the database, then * it loads it (and everything related to it), replaces all values with the new ones from the given object * and returns this new entity. This new entity is actually a loaded from the db entity with all properties * replaced from the new object. @@ -317,7 +317,7 @@ export class EntityManager { preload(entityClass: ObjectType, entityLike: DeepPartial): Promise; /** - * Creates a new entity from the given plan javascript object. If entity already exist in the database, then + * Creates a new entity from the given plain javascript object. If entity already exist in the database, then * it loads it (and everything related to it), replaces all values with the new ones from the given object * and returns this new entity. This new entity is actually a loaded from the db entity with all properties * replaced from the new object. @@ -325,7 +325,7 @@ export class EntityManager { preload(entitySchema: EntitySchema, entityLike: DeepPartial): Promise; /** - * Creates a new entity from the given plan javascript object. If entity already exist in the database, then + * Creates a new entity from the given plain javascript object. If entity already exist in the database, then * it loads it (and everything related to it), replaces all values with the new ones from the given object * and returns this new entity. This new entity is actually a loaded from the db entity with all properties * replaced from the new object. @@ -333,7 +333,7 @@ export class EntityManager { preload(entityName: string, entityLike: DeepPartial): Promise; /** - * Creates a new entity from the given plan javascript object. If entity already exist in the database, then + * Creates a new entity from the given plain javascript object. If entity already exist in the database, then * it loads it (and everything related to it), replaces all values with the new ones from the given object * and returns this new entity. This new entity is actually a loaded from the db entity with all properties * replaced from the new object. @@ -583,12 +583,12 @@ export class EntityManager { async insert(target: ObjectType|EntitySchema|string, entity: QueryDeepPartialEntity|(QueryDeepPartialEntity[])): Promise { // If user passed empty array of entities then we don't need to do - // anything. + // anything. // // Fixes GitHub issue #5734. If we were to let this through we would // run into problems downstream, like subscribers getting invoked with // the empty array where they expect an entity, and SQL queries with an - // empty VALUES clause. + // empty VALUES clause. if (Array.isArray(entity) && entity.length === 0) return Promise.resolve(new InsertResult()); diff --git a/src/repository/BaseEntity.ts b/src/repository/BaseEntity.ts index f1e77cc7e8..f63e19b2d9 100644 --- a/src/repository/BaseEntity.ts +++ b/src/repository/BaseEntity.ts @@ -163,7 +163,7 @@ export class BaseEntity { } /** - * Creates a new entity from the given plan javascript object. If entity already exist in the database, then + * Creates a new entity from the given plain javascript object. If entity already exist in the database, then * it loads it (and everything related to it), replaces all values with the new ones from the given object * and returns this new entity. This new entity is actually a loaded from the db entity with all properties * replaced from the new object. diff --git a/src/repository/Repository.ts b/src/repository/Repository.ts index 2a696de0f3..b8ad4390b2 100644 --- a/src/repository/Repository.ts +++ b/src/repository/Repository.ts @@ -107,7 +107,7 @@ export class Repository { } /** - * Creates a new entity from the given plan javascript object. If entity already exist in the database, then + * Creates a new entity from the given plain javascript object. If entity already exist in the database, then * it loads it (and everything related to it), replaces all values with the new ones from the given object * and returns this new entity. This new entity is actually a loaded from the db entity with all properties * replaced from the new object.