Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
amirrezaask committed Jun 1, 2022
1 parent 801b5a0 commit 3cca99c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ categories, err := orm.BelongsToMany[Category](post).All()
You may need to save an entity that has some kind of relationship with another entity; in that case, you can use `Add` method.
```go
orm.Add(post, comments...) // inserts all comments passed in and also sets all post_id to the primary key of the given post.
orm.Add(post, categories...) // inserts all categories and also insert intermediate post_categories records.
```

### Query Builder
Expand Down

0 comments on commit 3cca99c

Please sign in to comment.