e22m4u 1 месяц назад
Родитель
Сommit
5c67be8d2a
1 измененных файлов с 9 добавлено и 9 удалено
  1. 9 9
      README-en.md

+ 9 - 9
README-en.md

@@ -1096,10 +1096,10 @@ database.
 - [`patch(data, where = undefined)`](#repositorypatch) updates all or matching documents;
 - [`find(filter = undefined)`](#repositoryfind) finds all or matching documents;
 - [`findOne(filter = undefined)`](#repositoryfindone) finds the first matching document;
-- [`findById(id, filter = undefined)`](#repositoryfindbyid) finds a document by its id;
+- [`findById(id, filter = undefined)`](#repositoryfindbyid) finds a document by its ID;
 - [`delete(where = undefined)`](#repositorydelete) deletes all or matching documents;
-- [`deleteById(id)`](#repositorydeletebyid) deletes a document by its id;
-- [`exists(id)`](#repositoryexists) checks for existence by id;
+- [`deleteById(id)`](#repositorydeletebyid) deletes a document by its ID;
+- [`exists(id)`](#repositoryexists) checks for existence by ID;
 - [`count(where = undefined)`](#repositorycount) counts all or matching documents;
 
 **Arguments**
@@ -2118,7 +2118,7 @@ dbs.defineModel({
 
 - `type: string` the relation type (required);
 - `model: string` the target model name (required for some types);
-- `foreignKey: string` the property in the current model for the target id;
+- `foreignKey: string` the property in the current model for the target ID;
 
 *i. For Belongs To and References Many types, the `foreignKey` parameter
 can be omitted as it's automatically generated based on the relation name.*
@@ -2134,7 +2134,7 @@ name, which is stored in the document's discriminator property.*
 ### Relation Types
 
 - [Belongs To](#belongs-to)
-  The current model references the target model by its id.
+  The current model references the target model by its ID.
   `type: "belongsTo"` or `type: RelationType.BELONGS_TO`
 
 - [Has One](#has-one)
@@ -2430,7 +2430,7 @@ dbs.defineModel({
       // in a discriminator property, which is formed based on
       // the relation name with a "Type" postfix, in this case,
       // the target model's name is stored in "referenceType",
-      // and the document's id is in "referenceId"
+      // and the document's identifier is in "referenceId"
       polymorphic: true,
     },
   },
@@ -2446,7 +2446,7 @@ dbs.defineModel({
     reference: { // relation name
       type: RelationType.BELONGS_TO, // current model references target
       polymorphic: true, // target model name is in a discriminator
-      foreignKey: 'referenceId', // property for the target's id
+      foreignKey: 'referenceId', // property for the target's identifier
       discriminator: 'referenceType', // property for the target's name
     },
   },
@@ -2513,7 +2513,7 @@ dbs.defineModel({
       type: RelationType.HAS_ONE, // target model references current
       model: 'license', // target model name
       polymorphic: true, // current model name is in discriminator
-      foreignKey: 'ownerId', // property in target for current's id
+      foreignKey: 'ownerId', // property in target for current's identifier
       discriminator: 'ownerType', // property in target for current's name
     },
   },
@@ -2585,7 +2585,7 @@ dbs.defineModel({
       type: RelationType.HAS_MANY, // target model references current
       model: 'file', // target model name
       polymorphic: true, // current model name is in discriminator
-      foreignKey: 'referenceId', // property in target for current's id
+      foreignKey: 'referenceId', // property in target for current's identifier
       discriminator: 'referenceType', // property in target for current's name
     },
   },