Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Best way to handle many-to-many relationship?

default discord avatar
bombnp2 years ago
6

Say, I have two collections:

Books

and

Tags

. A book can have many tags, and a tag can be assigned to multiple books. When a book is tagged via relationship field (

tags

), I want the tag's relationship field (

books

) to be updated accordingly (create/update/delete). Im not sure to do that as of now. Any ideas?

  • discord user avatar
    jmikrut
    2 years ago

    Hey

    @275258786388639744

    check the

    #1004009734115966976

    channel— the community has built a plugin to do exactly this for you!

  • discord user avatar
    jmikrut
    2 years ago

    yes!

  • default discord avatar
    thedunco2 years ago

    Are there plans to officially support this? The repo states it's not ready for production (and in pre-alpha), but I would really like to use this feature in a production application

  • discord user avatar
    jmikrut
    2 years ago

    yes it will be officially supported



    we have to tackle additional database support before diving in here much more deeply

  • default discord avatar
    thedunco2 years ago

    Cool! For now I've gotten it working but had to do some custom modifications and clean-up

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.