Skip to content

Commit

Permalink
Add note about .first query, querying on assn, and limit clause [ci s…
Browse files Browse the repository at this point in the history
…kip]
  • Loading branch information
Ben Ng committed Jul 25, 2014
1 parent 5d5bf8f commit db92a92
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,11 @@ Team.all({'players.sponsors.name': 'Daffy Duck'}
Team.all({'players.sponsors.name': 'Daffy Duck'}
, {includes: {players: 'sponsors'}, limit: 5}
, function (err, data) {});

// Bad too, since .first is an implicit "limit: 1"
Team.first({'players.sponsors.name': 'Daffy Duck'}
, {includes: {players: 'sponsors'}, limit: 5}
, function (err, data) {});
```
* Streaming is not possible when sorting on a nested association before the top level id
Expand Down

0 comments on commit db92a92

Please sign in to comment.