74
Parent & child relationship/field
Yannis Kadiri
The easiest example to explain is laid out like this, we have the following models:
- Make
- Model
- Sales
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
Patrik Albertsson
We really need this in our upcoming project. Is there any updates on this feature? Or some workaround?
Derrick Mehaffy
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.
Use Case
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.Szymon Jankowski
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?
Aaron Ho
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?
Chonk
The lack of real ontology like this feature is why I didn't go with Strapi
F
Fabien
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.
M
Muhammad Zulqarnain Sabir
it's a very good feature, any expected launch data?
Ahmed Soliman
It's very important feature, I guess it's almost needed in any bigger than blog web application.
Yannis Kadiri
Not yet, we'll update you when that's the case.
P
PRASAD PATEWAR
Yannis Kadiri Any updates on this feature ? or any custom way to implement this ?
Thank you.
Abdubek Zholay
very important functionality, we need this
Load More
→