Skip to content

Commit

Permalink
changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bfrey08 committed Sep 30, 2024
1 parent 2de3004 commit 2f79cac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Not released

## 0.23.0
- Add support for nested select statements that are used in conjuction with nested includes (https://github.com/Beyond-Finance/active_force/pull/102)

## 0.22.1
- Fixes #94. Moved query logic and corrected ActiveQuery `ids` method (https://github.com/Beyond-Finance/active_force/pull/97)

Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,17 @@ Comment.includes(post: :owner)
Comment.includes({post: {owner: :account}})
```

You can also use #select with a multi level #includes.

Examples:

```ruby
Comment.select(:body, post: [:title, :is_active]).includes(post: :owner)
Comment.select(:body, account: :owner_id).includes({post: {owner: :account}})
```

The Sobject name in the #select must match the Sobject in the #includes for the fields to be filtered.

### Aggregates

Summing the values of a column:
Expand Down

0 comments on commit 2f79cac

Please sign in to comment.