Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
examples:builder:belongsto_relation [2021/03/28 21:26] pdsci-admin [Step 6: Add the related field to the parent table] |
examples:builder:belongsto_relation [2021/04/11 19:27] (current) pdsci-admin [The belongsTo relation] |
||
---|---|---|---|
Line 9: | Line 9: | ||
* Required: a // | * Required: a // | ||
* Create a model for the child table with list and form | * Create a model for the child table with list and form | ||
- | * Add a field named: // | + | * Add a field named: // |
* Extend **the parent controller** with relation behaviour | * Extend **the parent controller** with relation behaviour | ||
* Extend **the parent model** with the desired relation definition (// | * Extend **the parent model** with the desired relation definition (// | ||
Line 126: | Line 126: | ||
\\ | \\ | ||
\\ | \\ | ||
- | ===== Step : ===== | + | ===== Step 7: Add related fields to form and list ===== |
+ | The final step is to add a field to the parent form view, where the related data can be selected and a column to the list view.\\ | ||
+ | \\ | ||
+ | For the form view and the // | ||
+ | \\ | ||
+ | Anyhow, if the //Record finder// is the preferred choice, the most important thing to define ist the //List configuration// | ||
+ | If for some reason the definition of the child list view is not suitable for the //Record finder// - for example if there are too many columns defined that are not of essence for the selection of a related record - another list view can be defined in the child model. For example to hold only the columns needed. Let's call this additional view // | ||
+ | \\ | ||
+ | \\ | ||
{{: | {{: | ||
\\ | \\ | ||
\\ | \\ | ||