#Help needed with beego orm

3 messages · Page 1 of 1 (latest)

still saffron
#

I have data like this:

{
    "related_id": "1",
    "domain": "test.example.com",
    "email_id": [
        {
            "email_id": "[email protected]",
            "tag": "test"
        },
        {
            "email_id": "[email protected]",
            "tag": "test"
        }
    ],
    "cname": "cname.example.com"
}

I want to store this data in a database

from my understanding this will be a one to many relation where for one domain there will be many email_id. But I can really understand how the models would look like... and how would I insert the data in this relational table. I have worked with one to one relations in beego before but this is confusing me.

#

PS: I can't just ditch beego orm as the project I am working one is not a personal one.

noble narwhal
#

"reverse(many)"//Does setting a one to many inverse relationship mean a many to one relationship?ORM: "rel (M2M)" ` / / setting the one to many relationship M2M doesn't mean many to many? I'm confused about the one-to-many-to-one relationship of beego ORM table structure. I'm very grateful for the guidance of go God!Original address:https://gith...