Skip to content

Commit

Permalink
Merge pull request #951 from alipadron/patch-1
Browse files Browse the repository at this point in the history
Add issue #175 link in selecting-fields.md
  • Loading branch information
freekmurze authored Jun 14, 2024
2 parents 8b4a330 + 6d29e56 commit 0560057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/features/selecting-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ QueryBuilder::for(Post::class)
// All posts will be fetched including _only_ the name of the author.
```

⚠️ Keep in mind that the fields query will completely override the `SELECT` part of the query. This means that you'll need to manually specify any columns required for Eloquent relationships to work, in the above example `author.id`. See issue #175 as well.
⚠️ Keep in mind that the fields query will completely override the `SELECT` part of the query. This means that you'll need to manually specify any columns required for Eloquent relationships to work, in the above example `author.id`. See issue [#175](https://github.com/spatie/laravel-query-builder/issues/175) as well.

⚠️ `allowedFields` must be called before `allowedIncludes`. Otherwise the query builder won't know what fields to include for the requested includes and an exception will be thrown.

0 comments on commit 0560057

Please sign in to comment.