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

Commit c3afda63 by Nicholas W Fortner Committed by Sushant

Punctuation and grammar correction in docs/docs/associations.md. (#7211)

* (docs/docs/associations.md) punctuation fix - added comma

* (docs/docs/associations.md) punctuation fix - added comma

* (docs/docs/associations.md) grammar correction
1 parent 729575e0
Showing with 3 additions and 3 deletions
...@@ -290,7 +290,7 @@ This section concerns association scopes. For a definition of association scopes ...@@ -290,7 +290,7 @@ This section concerns association scopes. For a definition of association scopes
Association scopes allow you to place a scope (a set of default attributes for `get` and `create`) on the association. Scopes can be placed both on the associated model (the target of the association), and on the through table for n:m relations. Association scopes allow you to place a scope (a set of default attributes for `get` and `create`) on the association. Scopes can be placed both on the associated model (the target of the association), and on the through table for n:m relations.
#### 1:m #### 1:m
Assume we have tables Comment, Post and Image. A comment can be associated to either an image or a post via `commentable_id` and `commentable` - we say that Post and Image are `Commentable` Assume we have tables Comment, Post, and Image. A comment can be associated to either an image or a post via `commentable_id` and `commentable` - we say that Post and Image are `Commentable`
```js ```js
this.Comment = this.sequelize.define('comment', { this.Comment = this.sequelize.define('comment', {
...@@ -400,7 +400,7 @@ Tag.belongsToMany(Post, { ...@@ -400,7 +400,7 @@ Tag.belongsToMany(Post, {
Notice that the scoped column (`taggable`) is now on the through model (`ItemTag`). Notice that the scoped column (`taggable`) is now on the through model (`ItemTag`).
We could also define a more restrictive association, for example to get all pending tags for a post by applying a scope of both the through model (`ItemTag`) and the target model (`Tag`): We could also define a more restrictive association, for example, to get all pending tags for a post by applying a scope of both the through model (`ItemTag`) and the target model (`Tag`):
```js ```js
Post.hasMany(Tag, { Post.hasMany(Tag, {
...@@ -689,7 +689,7 @@ CREATE TABLE IF NOT EXISTS `Version` ( ...@@ -689,7 +689,7 @@ CREATE TABLE IF NOT EXISTS `Version` (
### Enforcing a foreign key reference without constraints ### Enforcing a foreign key reference without constraints
Some times you may want to reference another table, without adding any constraints, or associations. In that case you can manually add the reference attributes to your schema definition, and mark the relations between them. Sometimes you may want to reference another table, without adding any constraints, or associations. In that case you can manually add the reference attributes to your schema definition, and mark the relations between them.
```js ```js
var Series, Trainer, Video var Series, Trainer, Video
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!