Skip to content

Question: How to model Many-to-One with ID from API #140

Description

@stephane-segning

Suppose I have these responses from an API:

  • A Chat

    {
        "id": "some-chat-id",
        "name": "Some chat name"
    }
  • And a chat item (a message)

    {
        "id": "some-chat-item-id",
        "name": "Some chat item name",
        "chatId": "some-chat-id"
    }

I want to model it using a HasMany and BelongsTo but I don't have any idea how to do it. How should I map chat chatId to Chat using the framework ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions