diff --git a/pages/ar_SA/docs/advanced_query.md b/pages/ar_SA/docs/advanced_query.md
index 1014cda02cd..004e50e074c 100644
--- a/pages/ar_SA/docs/advanced_query.md
+++ b/pages/ar_SA/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/ar_SA/docs/associations.md b/pages/ar_SA/docs/associations.md
index ee30caf054f..b8e508e80b2 100644
--- a/pages/ar_SA/docs/associations.md
+++ b/pages/ar_SA/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/ar_SA/docs/has_one.md b/pages/ar_SA/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/ar_SA/docs/has_one.md
+++ b/pages/ar_SA/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/ar_SA/docs/models.md b/pages/ar_SA/docs/models.md
index 5908e752870..ce87244d127 100644
--- a/pages/ar_SA/docs/models.md
+++ b/pages/ar_SA/docs/models.md
@@ -176,7 +176,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/ar_SA/docs/polymorphism.md b/pages/ar_SA/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/ar_SA/docs/polymorphism.md
+++ b/pages/ar_SA/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/ar_SA/gen/create.md b/pages/ar_SA/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/ar_SA/gen/create.md
+++ b/pages/ar_SA/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/az_AZ/docs/advanced_query.md b/pages/az_AZ/docs/advanced_query.md
index 1014cda02cd..004e50e074c 100644
--- a/pages/az_AZ/docs/advanced_query.md
+++ b/pages/az_AZ/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/az_AZ/docs/associations.md b/pages/az_AZ/docs/associations.md
index ee30caf054f..b8e508e80b2 100644
--- a/pages/az_AZ/docs/associations.md
+++ b/pages/az_AZ/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/az_AZ/docs/has_one.md b/pages/az_AZ/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/az_AZ/docs/has_one.md
+++ b/pages/az_AZ/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/az_AZ/docs/models.md b/pages/az_AZ/docs/models.md
index 9e901068759..9fd3fa0de93 100644
--- a/pages/az_AZ/docs/models.md
+++ b/pages/az_AZ/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/az_AZ/docs/polymorphism.md b/pages/az_AZ/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/az_AZ/docs/polymorphism.md
+++ b/pages/az_AZ/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/az_AZ/gen/create.md b/pages/az_AZ/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/az_AZ/gen/create.md
+++ b/pages/az_AZ/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/de_DE/docs/advanced_query.md b/pages/de_DE/docs/advanced_query.md
index 852b5ac4dee..7972b47e8ec 100644
--- a/pages/de_DE/docs/advanced_query.md
+++ b/pages/de_DE/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/de_DE/docs/associations.md b/pages/de_DE/docs/associations.md
index 8c59d1dee1d..1909238602f 100644
--- a/pages/de_DE/docs/associations.md
+++ b/pages/de_DE/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/de_DE/docs/has_one.md b/pages/de_DE/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/de_DE/docs/has_one.md
+++ b/pages/de_DE/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/de_DE/docs/models.md b/pages/de_DE/docs/models.md
index 9e901068759..9fd3fa0de93 100644
--- a/pages/de_DE/docs/models.md
+++ b/pages/de_DE/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/de_DE/docs/polymorphism.md b/pages/de_DE/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/de_DE/docs/polymorphism.md
+++ b/pages/de_DE/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/de_DE/gen/create.md b/pages/de_DE/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/de_DE/gen/create.md
+++ b/pages/de_DE/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/es_ES/docs/advanced_query.md b/pages/es_ES/docs/advanced_query.md
index 39af27a2b0e..014f20d3e5b 100644
--- a/pages/es_ES/docs/advanced_query.md
+++ b/pages/es_ES/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Consultas Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/es_ES/docs/associations.md b/pages/es_ES/docs/associations.md
index 2b12bf6edba..e1cf54c866a 100644
--- a/pages/es_ES/docs/associations.md
+++ b/pages/es_ES/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/es_ES/docs/has_one.md b/pages/es_ES/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/es_ES/docs/has_one.md
+++ b/pages/es_ES/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/es_ES/docs/models.md b/pages/es_ES/docs/models.md
index 8a87b82f0a4..11105c4c606 100644
--- a/pages/es_ES/docs/models.md
+++ b/pages/es_ES/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/es_ES/docs/polymorphism.md b/pages/es_ES/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/es_ES/docs/polymorphism.md
+++ b/pages/es_ES/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/es_ES/gen/create.md b/pages/es_ES/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/es_ES/gen/create.md
+++ b/pages/es_ES/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/fa_IR/docs/advanced_query.md b/pages/fa_IR/docs/advanced_query.md
index 9a50c605faa..26d52f4358d 100644
--- a/pages/fa_IR/docs/advanced_query.md
+++ b/pages/fa_IR/docs/advanced_query.md
@@ -356,7 +356,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/fa_IR/docs/associations.md b/pages/fa_IR/docs/associations.md
index ee30caf054f..b8e508e80b2 100644
--- a/pages/fa_IR/docs/associations.md
+++ b/pages/fa_IR/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/fa_IR/docs/has_one.md b/pages/fa_IR/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/fa_IR/docs/has_one.md
+++ b/pages/fa_IR/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/fa_IR/docs/models.md b/pages/fa_IR/docs/models.md
index 9e901068759..9fd3fa0de93 100644
--- a/pages/fa_IR/docs/models.md
+++ b/pages/fa_IR/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/fa_IR/docs/polymorphism.md b/pages/fa_IR/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/fa_IR/docs/polymorphism.md
+++ b/pages/fa_IR/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/fa_IR/gen/create.md b/pages/fa_IR/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/fa_IR/gen/create.md
+++ b/pages/fa_IR/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/fr_FR/docs/advanced_query.md b/pages/fr_FR/docs/advanced_query.md
index b9042b1d578..463156ea98b 100644
--- a/pages/fr_FR/docs/advanced_query.md
+++ b/pages/fr_FR/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/fr_FR/docs/associations.md b/pages/fr_FR/docs/associations.md
index 8394d18174e..3211d92faa2 100644
--- a/pages/fr_FR/docs/associations.md
+++ b/pages/fr_FR/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/fr_FR/docs/has_one.md b/pages/fr_FR/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/fr_FR/docs/has_one.md
+++ b/pages/fr_FR/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/fr_FR/docs/models.md b/pages/fr_FR/docs/models.md
index 9e901068759..9fd3fa0de93 100644
--- a/pages/fr_FR/docs/models.md
+++ b/pages/fr_FR/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/fr_FR/docs/polymorphism.md b/pages/fr_FR/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/fr_FR/docs/polymorphism.md
+++ b/pages/fr_FR/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/fr_FR/gen/create.md b/pages/fr_FR/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/fr_FR/gen/create.md
+++ b/pages/fr_FR/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/hi_IN/docs/advanced_query.md b/pages/hi_IN/docs/advanced_query.md
index e69ed1fcfd5..e698ace5a73 100644
--- a/pages/hi_IN/docs/advanced_query.md
+++ b/pages/hi_IN/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/hi_IN/docs/associations.md b/pages/hi_IN/docs/associations.md
index 9b4d0f9297f..751ed78d26f 100644
--- a/pages/hi_IN/docs/associations.md
+++ b/pages/hi_IN/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/hi_IN/docs/has_one.md b/pages/hi_IN/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/hi_IN/docs/has_one.md
+++ b/pages/hi_IN/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/hi_IN/docs/models.md b/pages/hi_IN/docs/models.md
index 9e901068759..9fd3fa0de93 100644
--- a/pages/hi_IN/docs/models.md
+++ b/pages/hi_IN/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/hi_IN/docs/polymorphism.md b/pages/hi_IN/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/hi_IN/docs/polymorphism.md
+++ b/pages/hi_IN/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/hi_IN/gen/create.md b/pages/hi_IN/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/hi_IN/gen/create.md
+++ b/pages/hi_IN/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/id_ID/docs/advanced_query.md b/pages/id_ID/docs/advanced_query.md
index 8a4f7527907..c7e3ce17e76 100644
--- a/pages/id_ID/docs/advanced_query.md
+++ b/pages/id_ID/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Hook Kueri
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/id_ID/docs/associations.md b/pages/id_ID/docs/associations.md
index 5e93609b24a..d1f9afa51a8 100644
--- a/pages/id_ID/docs/associations.md
+++ b/pages/id_ID/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/id_ID/docs/has_one.md b/pages/id_ID/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/id_ID/docs/has_one.md
+++ b/pages/id_ID/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/id_ID/docs/models.md b/pages/id_ID/docs/models.md
index 60f73b8ad6c..45d07f303d5 100644
--- a/pages/id_ID/docs/models.md
+++ b/pages/id_ID/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tag bersifat opsional untuk digunakan saat mendeklarasikan model, GORM mendukung tag berikut: Tag bersifat *case insensitive*, namun `camelCase` lebih disukai.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Nama Tag | Deskripsi |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/id_ID/docs/polymorphism.md b/pages/id_ID/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/id_ID/docs/polymorphism.md
+++ b/pages/id_ID/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/id_ID/gen/create.md b/pages/id_ID/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/id_ID/gen/create.md
+++ b/pages/id_ID/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/it_IT/docs/advanced_query.md b/pages/it_IT/docs/advanced_query.md
index 69ec5aa233e..195c6b75260 100644
--- a/pages/it_IT/docs/advanced_query.md
+++ b/pages/it_IT/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/it_IT/docs/associations.md b/pages/it_IT/docs/associations.md
index ee30caf054f..b8e508e80b2 100644
--- a/pages/it_IT/docs/associations.md
+++ b/pages/it_IT/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/it_IT/docs/has_one.md b/pages/it_IT/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/it_IT/docs/has_one.md
+++ b/pages/it_IT/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/it_IT/docs/models.md b/pages/it_IT/docs/models.md
index 9e901068759..9fd3fa0de93 100644
--- a/pages/it_IT/docs/models.md
+++ b/pages/it_IT/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/it_IT/docs/polymorphism.md b/pages/it_IT/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/it_IT/docs/polymorphism.md
+++ b/pages/it_IT/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/it_IT/gen/create.md b/pages/it_IT/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/it_IT/gen/create.md
+++ b/pages/it_IT/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/ja_JP/docs/advanced_query.md b/pages/ja_JP/docs/advanced_query.md
index 5b80d1f620b..e5295e7fd6c 100644
--- a/pages/ja_JP/docs/advanced_query.md
+++ b/pages/ja_JP/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/ja_JP/docs/associations.md b/pages/ja_JP/docs/associations.md
index 77a380e7ed9..f116666c4de 100644
--- a/pages/ja_JP/docs/associations.md
+++ b/pages/ja_JP/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/ja_JP/docs/has_one.md b/pages/ja_JP/docs/has_one.md
index 9656e07d259..ec448c0a93f 100644
--- a/pages/ja_JP/docs/has_one.md
+++ b/pages/ja_JP/docs/has_one.md
@@ -68,7 +68,7 @@ type CreditCard struct {
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/ja_JP/docs/models.md b/pages/ja_JP/docs/models.md
index ede9dc777cd..6bfd9276791 100644
--- a/pages/ja_JP/docs/models.md
+++ b/pages/ja_JP/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### フィールドに指定可能なタグ
-タグはモデル宣言時に任意で使用できます。GORMは以下のタグをサポートしています。(タグは大文字小文字を区別しませんが、 `camelCase` が推奨されます)
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| タグ名 | 説明 |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/ja_JP/docs/polymorphism.md b/pages/ja_JP/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/ja_JP/docs/polymorphism.md
+++ b/pages/ja_JP/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/ja_JP/gen/create.md b/pages/ja_JP/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/ja_JP/gen/create.md
+++ b/pages/ja_JP/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/ko_KR/docs/advanced_query.md b/pages/ko_KR/docs/advanced_query.md
index 4d8f0ef019e..68d519feb7e 100644
--- a/pages/ko_KR/docs/advanced_query.md
+++ b/pages/ko_KR/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/ko_KR/docs/associations.md b/pages/ko_KR/docs/associations.md
index d5a5d1c55de..d3c58ba45df 100644
--- a/pages/ko_KR/docs/associations.md
+++ b/pages/ko_KR/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/ko_KR/docs/has_one.md b/pages/ko_KR/docs/has_one.md
index f8b2c22faab..c4ef059036a 100644
--- a/pages/ko_KR/docs/has_one.md
+++ b/pages/ko_KR/docs/has_one.md
@@ -68,7 +68,7 @@ type CreditCard struct {
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/ko_KR/docs/models.md b/pages/ko_KR/docs/models.md
index f1683548aa0..9dcc6a5740a 100644
--- a/pages/ko_KR/docs/models.md
+++ b/pages/ko_KR/docs/models.md
@@ -170,7 +170,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| 태그 이름 | 설명 |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/ko_KR/docs/polymorphism.md b/pages/ko_KR/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/ko_KR/docs/polymorphism.md
+++ b/pages/ko_KR/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/ko_KR/gen/create.md b/pages/ko_KR/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/ko_KR/gen/create.md
+++ b/pages/ko_KR/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/pl_PL/docs/advanced_query.md b/pages/pl_PL/docs/advanced_query.md
index 77e52406d5e..880b25d1575 100644
--- a/pages/pl_PL/docs/advanced_query.md
+++ b/pages/pl_PL/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/pl_PL/docs/associations.md b/pages/pl_PL/docs/associations.md
index ee30caf054f..b8e508e80b2 100644
--- a/pages/pl_PL/docs/associations.md
+++ b/pages/pl_PL/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/pl_PL/docs/has_one.md b/pages/pl_PL/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/pl_PL/docs/has_one.md
+++ b/pages/pl_PL/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/pl_PL/docs/models.md b/pages/pl_PL/docs/models.md
index 9e901068759..9fd3fa0de93 100644
--- a/pages/pl_PL/docs/models.md
+++ b/pages/pl_PL/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/pl_PL/docs/polymorphism.md b/pages/pl_PL/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/pl_PL/docs/polymorphism.md
+++ b/pages/pl_PL/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/pl_PL/gen/create.md b/pages/pl_PL/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/pl_PL/gen/create.md
+++ b/pages/pl_PL/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/pt_BR/docs/advanced_query.md b/pages/pt_BR/docs/advanced_query.md
index f60fb1016eb..d369a1b32c8 100644
--- a/pages/pt_BR/docs/advanced_query.md
+++ b/pages/pt_BR/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Hooks de consulta
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/pt_BR/docs/associations.md b/pages/pt_BR/docs/associations.md
index 60162ded4c1..90616acff58 100644
--- a/pages/pt_BR/docs/associations.md
+++ b/pages/pt_BR/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/pt_BR/docs/has_one.md b/pages/pt_BR/docs/has_one.md
index 3f65e1c9d87..2401923b0d5 100644
--- a/pages/pt_BR/docs/has_one.md
+++ b/pages/pt_BR/docs/has_one.md
@@ -68,7 +68,7 @@ Você pode mudar isso com a tag `references`, ex:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/pt_BR/docs/models.md b/pages/pt_BR/docs/models.md
index bda35c4e198..fe0457cf24d 100644
--- a/pages/pt_BR/docs/models.md
+++ b/pages/pt_BR/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/pt_BR/docs/polymorphism.md b/pages/pt_BR/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/pt_BR/docs/polymorphism.md
+++ b/pages/pt_BR/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/pt_BR/gen/create.md b/pages/pt_BR/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/pt_BR/gen/create.md
+++ b/pages/pt_BR/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/ru_RU/community.md b/pages/ru_RU/community.md
index 563e8e77470..35ac1b67909 100644
--- a/pages/ru_RU/community.md
+++ b/pages/ru_RU/community.md
@@ -22,9 +22,9 @@ layout: страница
* Article that validate GORM as ORM to Golang with CRUD implementation with SQLite database on tests - [looking-for-an-orm-to-database-layer-with-golang](https://medium.com/@rafaelholanda90/continuing-looking-for-an-orm-to-database-layer-with-golang-7fee0316a989)
-* [Strongly typed JSON/JSONB fields in GORM](https://www.terminateandstayresident.com/2022-07-13/orm-json)
+* [Строго типизированые JSON/JSONB поля в GORM](https://www.terminateandstayresident.com/2022-07-13/orm-json)
-* [Using GORM concurrently is not safe](https://zhuanlan.zhihu.com/p/556065676)
+* [Конкурентное использование GORM небезопасно](https://zhuanlan.zhihu.com/p/556065676)
## Видео
@@ -32,8 +32,8 @@ layout: страница
## Открытый исходный код
-* [gormt - GORM mysql to golang struct](https://github.com/xxjwxc/gormt)
-* [go-paginate - cursor-based pagination](https://github.com/raphaelvigee/go-paginate)
+* [gormt - GORM mysql в golang структура](https://github.com/xxjwxc/gormt)
+* [go-paginate - пагинация на основе указателя](https://github.com/raphaelvigee/go-paginate)
* [zapgorm - Uber's Zap logging driver for gorm 1 (=v1.20)](https://github.com/moul/zapgorm2)
* [gorm-newrelic-telemetry-plugin - A plugin to allow telemetry by NewRelic Go Agent for GORM](https://github.com/rafaelhl/gorm-newrelic-telemetry-plugin)
diff --git a/pages/ru_RU/contribute.md b/pages/ru_RU/contribute.md
index dc7b1750b29..1893877f32a 100644
--- a/pages/ru_RU/contribute.md
+++ b/pages/ru_RU/contribute.md
@@ -14,7 +14,7 @@ layout: страница
## Документация и написание
-* Make GORM's documentation better by writing new content, correcting existing material [https://github.com/go-gorm/gorm.io](https://github.com/go-gorm/gorm.io)
+* Сделайте документацию GORM лучше добавляя новый контент, исправляя существующие материалы[https://github.com/go-gorm/gorm.io](https://github.com/go-gorm/gorm.io)
### Перевести этот сайт
@@ -29,9 +29,9 @@ layout: страница
## Пожертвования
-Your kindness and generosity is greatly appreciated, many thanks to all our sponsors!
+Спасибо всем нашим спонсорам за вашу доброту и щедрость!
-* Github Sponsors (Platinum, Gold Sponsors etc)
+* Github Sponsors (Platinum, Gold Sponsors и т.д.)
[https://github.com/sponsors/jinzhu](https://github.com/sponsors/jinzhu)
diff --git a/pages/ru_RU/docs/advanced_query.md b/pages/ru_RU/docs/advanced_query.md
index 40ab5b93afd..f52f482404b 100644
--- a/pages/ru_RU/docs/advanced_query.md
+++ b/pages/ru_RU/docs/advanced_query.md
@@ -5,7 +5,7 @@ layout: страница
## Умный выбор полей
-In GORM, you can efficiently select specific fields using the [`Select`](query.html) method. This is particularly useful when dealing with large models but requiring only a subset of fields, especially in API responses.
+В GORM вы можете эффективно выбирать конкретные поля, используя метод [`Select`](query.html). This is particularly useful when dealing with large models but requiring only a subset of fields, especially in API responses.
```go
type User struct {
@@ -98,7 +98,7 @@ db.Select("AVG(age) as avgage").Group("name").Having("AVG(age) > (?)", subQuery)
### Из SubQuery (под запроса)
-GORM allows the use of subqueries in the FROM clause, enabling complex queries and data organization.
+GORM позволяет использовать подзапросы в оговорке "FROM", позволяя сложные запросы и организацию данных.
```go
// Using subquery in FROM clause
@@ -114,21 +114,22 @@ db.Table("(?) as u, (?) as p", subQuery1, subQuery2).Find(&User{})
## Группировка условий
-Group Conditions in GORM provide a more readable and maintainable way to write complex SQL queries involving multiple conditions.
+Групповые условия в GORM обеспечивают более читаемый и поддерживаемый способ записи сложных SQL-запросов с несколькими условиями.
```go
-// Complex SQL query using Group Conditions
+// Сложны SQL запросы использую групповые условия
db.Where(
- db.Where("pizza = ?", "pepperoni").Where(db.Where("size = ?", "small").Or("size = ?", "medium")),
+ db.Where("pizza = ?", "pepperoni").Where(db.Where("size = ?", "small").Or("size = ?", "medium")),
).Or(
- db.Where("pizza = ?", "hawaiian").Where("size = ?", "xlarge"),
-).Find(&Pizza{})
-// SQL: SELECT * FROM `pizzas` WHERE (pizza = "pepperoni" AND (size = "small" OR size = "medium")) OR (pizza = "hawaiian" AND size = "xlarge")
+ db.Where("pizza = ?", "hawaiian").Where("size = ?", "xlarge"),
+).Find(&Pizza{}).Statement
+
+// SELECT * FROM `pizzas` WHERE (pizza = "pepperoni" AND (size = "small" OR size = "medium")) OR (pizza = "hawaiian" AND size = "xlarge")
```
## IN с несколькими столбцами
-GORM supports the IN clause with multiple columns, allowing you to filter data based on multiple field values in a single query.
+GORM поддерживает оператор IN с несколькими колонками, позволяя фильтровать данные на основе нескольких значений полей в одном запросе.
```go
// Using IN with multiple columns
@@ -358,7 +359,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Хуки запросов
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/ru_RU/docs/associations.md b/pages/ru_RU/docs/associations.md
index 6d5cebedea8..b13d23c5f5b 100644
--- a/pages/ru_RU/docs/associations.md
+++ b/pages/ru_RU/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/ru_RU/docs/has_one.md b/pages/ru_RU/docs/has_one.md
index 46daf057ffd..50256c67bf7 100644
--- a/pages/ru_RU/docs/has_one.md
+++ b/pages/ru_RU/docs/has_one.md
@@ -68,7 +68,7 @@ type CreditCard struct {
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/ru_RU/docs/models.md b/pages/ru_RU/docs/models.md
index 6aec954de0c..140432a564c 100644
--- a/pages/ru_RU/docs/models.md
+++ b/pages/ru_RU/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Теги полей
-Теги необязательны для использования при определении моделей, GORM поддерживает следующие теги: Теги не чувствительны к регистру, однако `регистру` является предпочтительным.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Наименование тэга | Описание |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
diff --git a/pages/ru_RU/docs/polymorphism.md b/pages/ru_RU/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/ru_RU/docs/polymorphism.md
+++ b/pages/ru_RU/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/ru_RU/gen/create.md b/pages/ru_RU/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/ru_RU/gen/create.md
+++ b/pages/ru_RU/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/tr_TR/docs/advanced_query.md b/pages/tr_TR/docs/advanced_query.md
index 383fe54166c..17a990fa18c 100644
--- a/pages/tr_TR/docs/advanced_query.md
+++ b/pages/tr_TR/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## Query Hooks
-GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the databas.
+GORM offers the ability to use hooks, such as `AfterFind`, which are triggered during the lifecycle of a query. These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
This hook is useful for post-query data manipulation or default value settings. For more detailed information and additional hook types, refer to [Hooks](hooks.html) in the GORM documentation.
diff --git a/pages/tr_TR/docs/associations.md b/pages/tr_TR/docs/associations.md
index 311b1b6b9c6..54cd6cbe0b6 100644
--- a/pages/tr_TR/docs/associations.md
+++ b/pages/tr_TR/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/tr_TR/docs/has_one.md b/pages/tr_TR/docs/has_one.md
index 9dc0a9248f6..bb3d131575c 100644
--- a/pages/tr_TR/docs/has_one.md
+++ b/pages/tr_TR/docs/has_one.md
@@ -68,7 +68,7 @@ You are able to change it with tag `references`, e.g:
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/tr_TR/docs/models.md b/pages/tr_TR/docs/models.md
index 9e901068759..9fd3fa0de93 100644
--- a/pages/tr_TR/docs/models.md
+++ b/pages/tr_TR/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### Fields Tags
-Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred.
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| Tag Name | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/pages/tr_TR/docs/polymorphism.md b/pages/tr_TR/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/tr_TR/docs/polymorphism.md
+++ b/pages/tr_TR/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/tr_TR/gen/create.md b/pages/tr_TR/gen/create.md
index fcb9cad55a8..4df1faab59a 100644
--- a/pages/tr_TR/gen/create.md
+++ b/pages/tr_TR/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL
diff --git a/pages/zh_CN/docs/advanced_query.md b/pages/zh_CN/docs/advanced_query.md
index 2c2b6c6fa4f..0e28ecbfe73 100644
--- a/pages/zh_CN/docs/advanced_query.md
+++ b/pages/zh_CN/docs/advanced_query.md
@@ -358,7 +358,7 @@ result := db.Where("processed = ?", false).FindInBatches(&results, 100, func(tx
## 查询钩子
-GORM 提供了使用钩子的能力,例如 `AfterFind`,这些钩子是在查询的生命周期中触发的。 这些钩子允许在特定点执行自定义逻辑,例如在从数据库检索记录之后。
+GORM 提供了使用钩子的能力,例如 `AfterFind`,这些钩子是在查询的生命周期中触发的。 These hooks allow for custom logic to be executed at specific points, such as after a record has been retrieved from the database.
此钩子对后查询数据操纵或默认值设置非常有用。 欲了解更详细的信息和额外的钩子,请参阅GORM文档中的 [Hooks](hooks.html)。
diff --git a/pages/zh_CN/docs/associations.md b/pages/zh_CN/docs/associations.md
index 95ec067c028..967afd639d5 100644
--- a/pages/zh_CN/docs/associations.md
+++ b/pages/zh_CN/docs/associations.md
@@ -145,7 +145,7 @@ db.Select("Account").Delete(&users)
```
{% note warn %}
-**NOTE:** It's important to note that associations will only be deleted if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
+**NOTE:** It's important to note that associations will be deleted only if the primary key of the deleting record is not zero. GORM uses these primary keys as conditions to delete the selected associations.
```go
// This will not work as intended
diff --git a/pages/zh_CN/docs/has_one.md b/pages/zh_CN/docs/has_one.md
index c2fb30cc977..c341923d3cd 100644
--- a/pages/zh_CN/docs/has_one.md
+++ b/pages/zh_CN/docs/has_one.md
@@ -67,7 +67,7 @@ type CreditCard struct {
type User struct {
gorm.Model
Name string `gorm:"index"`
- CreditCard CreditCard `gorm:"foreignKey:UserName;references:name"`
+ CreditCard CreditCard `gorm:"foreignKey:UserName;references:Name"`
}
type CreditCard struct {
diff --git a/pages/zh_CN/docs/models.md b/pages/zh_CN/docs/models.md
index a15e8fe88a8..ed346a11ade 100644
--- a/pages/zh_CN/docs/models.md
+++ b/pages/zh_CN/docs/models.md
@@ -172,7 +172,7 @@ type Blog struct {
### 字段标签
-声明 model 时,tag 是可选的,GORM 支持以下 tag: tag 名大小写不敏感,但建议使用 `camelCase` 风格
+Tags are optional to use when declaring models, GORM supports the following tags: Tags are case insensitive, however `camelCase` is preferred. If multiple tags are used they should be separated by a semicolon (`;`). Characters that have special meaning to the parser can be escaped with a backslash (`\`) allowing them to be used as parameter values.
| 标签名 | 说明 |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
diff --git a/pages/zh_CN/docs/polymorphism.md b/pages/zh_CN/docs/polymorphism.md
index 5af4a041d60..a450e12e43d 100644
--- a/pages/zh_CN/docs/polymorphism.md
+++ b/pages/zh_CN/docs/polymorphism.md
@@ -39,7 +39,7 @@ You can specify polymorphism properties separately using the following GORM tags
type Dog struct {
ID int
Name string
- Toys Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
+ Toys []Toy `gorm:"polymorphicType:Kind;polymorphicId:OwnerID;polymorphicValue:master"`
}
type Toy struct {
diff --git a/pages/zh_CN/gen/create.md b/pages/zh_CN/gen/create.md
index 320d4f10b3c..143d228b4f4 100644
--- a/pages/zh_CN/gen/create.md
+++ b/pages/zh_CN/gen/create.md
@@ -92,7 +92,7 @@ err := query.User.WithContext(ctx).Clauses(clause.OnConflict{
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET ***; SQL Server
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE ***; MySQL
-err := query.User.WithContext(ctx).Clauses(clause.OnConflict{Columns: []string{"Name", "Age"}}).Create(&user).Error
+err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error
// MERGE INTO "users" USING *** WHEN NOT MATCHED THEN INSERT *** WHEN MATCHED THEN UPDATE SET "name"="excluded"."name"; SQL Server
// INSERT INTO "users" *** ON CONFLICT ("id") DO UPDATE SET "name"="excluded"."name", "age"="excluded"."age"; PostgreSQL
// INSERT INTO `users` *** ON DUPLICATE KEY UPDATE `name`=VALUES(name),`age`=VALUES(age); MySQL