Comments (1)
Hey @ccamarillo !
We've added nested relation definitions in v3.6, it should be released very soon. Hopefully it will solve this issue, the timing is very good, if so. Here is an example:
# Need a variant definition to go here...
variant: []
# Details through variant
variant[details]:
label: 'Detail'
structure:
showTree: false
showReorder: true
dragRow: true
view:
list: $/xxx/xxx/models/productdetail/columns.yaml
toolbarButtons: create|delete
manage:
list: $/xxx/xxx/models/productdetail/columns.yaml
form: $/xxx/xxx/models/productdetail/fields.yaml
# Details through product
details:
label: 'Detail'
structure:
showTree: false
showReorder: true
dragRow: true
view:
list: $/xxx/xxx/models/productdetail/columns.yaml
toolbarButtons: create|delete
manage:
list: $/xxx/xxx/models/productdetail/columns.yaml
form: $/xxx/xxx/models/productdetail/fields.yaml
Here's what we've added to the docs. It is designed to work in conjunction with the relation form widget with the useController
property set to true
.
Nested Definitions
The Relation Controller supports nesting relations, in other words, managing relations through relations. A nested relationship uses the standard field nesting syntax. For example, the countries[cities]
relation definition makes the cities
relationship available to manage through the countries
relationship.
countries:
label: Country
form: $/acme/location/models/country/fields.yaml
list: $/acme/location/models/country/columns.yaml
countries[cities]:
label: City
form: $/acme/location/models/city/fields.yaml
list: $/acme/location/models/city/columns.yaml
Tip: Nested relation definitions are designed to work seamlessly with the relation form widget, setting the
useController
property set totrue
.
from october.
Related Issues (20)
- Use "merge keys" / "block definitions" for grouped repeaters HOT 2
- Page in Backend List is not applied correctly after filterChange HOT 1
- Multisite & Combiner - cannot find /combiner/xxx files on all sites HOT 8
- Default Value for Balloon-Selector not applied if the field is added via addTabFields()
- Returning False in model.before…() Still Flashes Success HOT 2
- Implement select For type: taglist HOT 5
- Call to a member function getKey() on null HOT 1
- Watch data-list-checked-request without user button click HOT 3
- October 3.6 - InvalidArgumentException: View [lang.strings.mail_form_submit] not found. HOT 3
- October 3.6 - Update error HOT 4
- Missing background image on login page HOT 1
- Navigation items visible without permissions HOT 2
- Error when sending e-mail HOT 2
- In Safari, list filters are not aligned correctly. HOT 1
- Wrong Order for displayMode: sidebar on Small Screens HOT 1
- Group Scope for Parent/Nested Relations HOT 1
- Class 'Str' not found HOT 2
- Call to undefined method October\Rain\Database\Relations\AttachMany::getRelatedKeyName() HOT 1
- Error exporting models using csv_custom file format HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from october.