不要怂,就是干,撸起袖子干!

Commit 45d9c226 by Juarez Lustosa Committed by GitHub

docs: add unique: false to belongs_to_many (#12481)

1 parent 631f555c
Showing with 1 additions and 1 deletions
...@@ -308,7 +308,7 @@ CREATE TABLE IF NOT EXISTS "ActorMovies" ( ...@@ -308,7 +308,7 @@ CREATE TABLE IF NOT EXISTS "ActorMovies" (
Unlike One-To-One and One-To-Many relationships, the defaults for both `ON UPDATE` and `ON DELETE` are `CASCADE` for Many-To-Many relationships. Unlike One-To-One and One-To-Many relationships, the defaults for both `ON UPDATE` and `ON DELETE` are `CASCADE` for Many-To-Many relationships.
Belongs-To-Many creates a unique key when primary key is not present on through model. This unique key name can be overridden using **uniqueKey** option. Belongs-To-Many creates a unique key on through model. This unique key name can be overridden using **uniqueKey** option. To prevent creating this unique key, use the ***unique: false*** option.
```js ```js
Project.belongsToMany(User, { through: UserProjects, uniqueKey: 'my_custom_unique' }) Project.belongsToMany(User, { through: UserProjects, uniqueKey: 'my_custom_unique' })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!