Skip to content

Commit

Permalink
Documentation about belongTo relationship (#4729)
Browse files Browse the repository at this point in the history
In a belongsTo relationship both fields: relationship and foreign key play a role but this is not explained in docs.

Closes #3428

Co-authored-by: Christoph Schweppe <[email protected]>
  • Loading branch information
MrCrayon and emptynick authored Jan 29, 2021
1 parent cb98889 commit 3c2d314
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/bread/relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ And add the following to the relationship options:

The value is the name of your scope-method without the word `scope`.
The value for `scopeActive()` is `active`. For `scopeSomeUsers()` it is `someUsers`.

{% hint style="info" %}
In a BelongsTo relationship the foreign key field decides if value can be saved on add or edit and applies validation rules for everything else, like visibility in browse and edit, the relationship field is used.
{% endhint %}

0 comments on commit 3c2d314

Please sign in to comment.