Parent & child relationship/field
The easiest example to explain is laid out like this, we have the following models:
In this context we are talking about cars, so the make would contain a list of car manufacturers (Subaru, Toyota, Ford, Chevy, ect). Thus the model would contain some options like WRX, GT86, Mustang, Corvette.
The way we would setup the sales model would be a oneWay relation to each make/model, and in the context of this request when we create a new "sale" we would select the make (say subaru) now when I go to select the model I should only be able to see/select the "WRX" model since it's made by Subaru.
I should not be able to select "Toyota" "Mustang" as that car doesn't exist.
See for more information: https://github.com/strapi/strapi/issues/8708
We really need this in our upcoming project. Is there any updates on this feature? Or some workaround?
Merged in a post:
Allow constraints/filters in relationships
Javier Diaz Chamorro
Currently, we can define the relation model but we cannot define constraints or filters in this relation.
You define a new blog block called
Popular Posts, and to improve the editor's experience and prevent errors from occurring it should show only those posts that match to some category.
Otherwise, there should be the possibility to show other fields in the selection dropdown in the relationship, for example,
Title - Category, in order to make a more accurate search.
I'm quite suprised this feature is not prioritized. Could we at least have any information if it's considered worth developing and planned for any future?
Definitely needed, it's currently impossible to build a taxonomy-based/hierarchy-based content-type without being able to filter/select a parent relation.
We are also exploring the option to build our own plugin but it would be good to know if this is being prioritized any time soon?
The lack of real ontology like this feature is why I didn't go with Strapi
Chonk: I feel the same way. I am really missing a category tree. It would be great if we could use it to build a page tree with a nested data structure.
Muhammad Zulqarnain Sabir
it's a very good feature, any expected launch data?
It's very important feature, I guess it's almost needed in any bigger than blog web application.
Not yet, we'll update you when that's the case.
Yannis Kadiri Any updates on this feature ? or any custom way to implement this ?
very important functionality, we need this