many to many relationships

Follow

Comments

3 comments

  • Avatar
    Suzie Prince

    Hi Rainer


    We do not have a way to special way to manage many to many relationship but you can create card relationship properties that can link cards to each other without the need for a tree. Using these you will not be able to set multiple values for a single property but you could create multiple properties, such as "Customer 1", "Customer 2" etc... on each card. You will be able to create tables or charts that show these relationships. For example:


    "Show me all stories for this customer"


    {{
      table
        query: SELECT name, number WHERE "customer 1" is THIS CARD or "customer 2" is THIS CARD
    }}


    I hope this information will be useful.


    For your information we use tags to manage our customer to story links and we have found this to be adequate. I'd be interested in understanding what about this is uncomfortable for you?


    Thanks


    - Suzie

  • Avatar
    Rainer Schmidt

    Hi Suzie,


    thanks for your answer, but I think working with card relationship properties to model a many to many relationship is not the way I want to go.


    About your question. Working with tags is not really uncomfortable, tagging is a nice feature, but to use it to model a many to many relationship (like customer to story and vica versa) is for me a kind of wrong usage, because a tag is a tag and should not have a specific build in logic. A customer should be an object (card typ) with the possibility to model a many to many relationship with any other object (card typ). A tag is not the same, its only a workaround.


    It is planned to add many to many relationships in a further release of mingle?


    /Rainer

  • Avatar
    Benjamin Butler-Cole

    Hi Rainer


    You can model many-to-many relationships in just the same way that you model them in SQL: you need to create a new card type to represent the relationship.


    Your example requires three card types: Story, Customer and Story-to-Customer. The Story-to-Customer card type has just two properties: Story and Customer.


    Then to display the customers for a story you could say:


    {{
      table
        query: SELECT Customer WHERE TYPE IS Story-to-Customer AND Story is THIS CARD
    }}


    [I haven't tested this code.]


    Ben

Please sign in to leave a comment.