For some reason I cannot get the has_many/belongs_to relationship to work. The nested content type does not show up in the parent. Here is what I have:
app/content_types/news_photos.yml
- article:
label: News articles
type: belongs_to
target: news_articles
app/content_types/news_articles.yml
- news_photos:
label: News photos
type: has_many
target: news_photos
class_name: news_photos
inverse_of: news_article
required: false
hint: A description of the field for the editors
localized: false
ui_enabled: true
Thanks for the help!
I'm not sure if you got to the solution but the issue is in fact in naming. The
has_many
definition should haveinverse_of: article
The value of
inverse_of
should be the name of the attribute that has thebelongs_to
relation in other model, in this casenews_photos
.