content icon indicating copy to clipboard operation
content copied to clipboard

feat(content): support nested collection relations

Open toddeTV opened this issue 7 months ago • 6 comments

Is your feature request related to a problem? Please describe

For the development of the new website for the 3D printing conference Printed-Amsterdam, I chose Nuxt3 with @nuxt/content in combination with NuxtStudio. This setup is intended to provide an intuitive and user-friendly experience, especially for non-technical users.

However, during the creation of the data schema, two fundamental missing features became apparent:

  • Content files with a type == data schema are not being validated (see #3351 ).
  • Nested collections for managing relations are not supported (this feature request).

The project is available as an open-source repository for the community: https://github.com/toddeTV/printed-amsterdam.com

Describe the solution you'd like

It would be extremely helpful to support relationships between collections. Since @nuxt/content v3 now uses an underlying SQLite database, this should be more feasible than in previous versions.

As a practical example, in the current project, a talk can be given by one or more speakers. This scenario requires a many-to-many relationship. It would be ideal if such relationships could be defined in both directions, but even a basic one-way reference would unlock a wide range of powerful use cases - especially since reverse querying is still possible with a bit of logic.

Describe alternatives you've considered

Currently, the only workaround is to manually create slugs and reference them across collections without any form of validation during build time. This approach is inconvenient and error-prone, making @nuxt/content projects difficult to scale.

Alternatively, switching to another headless CMS is possible, but that would mean leaving the Nuxt ecosystem. However, relationships between collections are a basic feature required by many projects beyond simple blogs.

Additional context

This would be a great enhancement for NuxtStudio in particular, as it could provide a searchable dropdown field for linking entries from another collection.

toddeTV avatar May 13 '25 14:05 toddeTV

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Jul 12 '25 15:07 github-actions[bot]

I approve this feature request : I need for my website to link a content to another.

During edition, this could be very neat to have suggestions of collection items which are linkable.

edimitchel avatar Aug 13 '25 22:08 edimitchel

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Oct 12 '25 23:10 github-actions[bot]

Any news on this?

biroplane avatar Oct 27 '25 18:10 biroplane

We should wait for updates coming quickly (I hope cc @larbish :D)

edimitchel avatar Oct 27 '25 21:10 edimitchel

This feature would be really helpful. I'm currently migrating from sanity to nuxt studio and would love to see this implemented.

I have it currently set up like this in sanity. Tehchnologies have name and url and each project has dropdown to select from those predefined technologies

https://github.com/user-attachments/assets/e128456b-8b58-4e53-a755-69c4224cd03a

This is my current workaround for nuxt studio: https://discord.com/channels/1084786508424282154/1084786509036658784/1432360421439963136

Would love to see support for this kind of relational data structure

michaelreinhard1 avatar Oct 30 '25 02:10 michaelreinhard1