Hello. I think I’ve found something strange in Pri...
# prisma-whats-new
r
Hello. I think I’ve found something strange in Prisma I have this schema:
Copy code
type Technology {
  id: ID! @unique
  name: String!
  childTechnologies: [Technology!]! @relation(name: "ChildTechnologies")
  parentTechnologies: [Technology!]! @relation(name: "ChildTechnologies")
}
When trying to add a child to this technology with
Copy code
ctx.db.mutation.updateTechnology({
      where: {
        id: "techA"
      },
      data: {
        childTechnologies: {
          connect: {
            id: "techB"
          }
        }
      }
    }, info)
The final result becomes:
Copy code
{
  "data": {
    "technologies": [
      {
        "id": "techA",
        "name": "My Technology Updated",
        "childTechnologies": [
          {
            "id": "techB"
          }
        ],
        "parentTechnologies": [
          {
            "id": "techB"
          }
        ]
      },
      {
        "id": "techB",
        "name": "Another Technology",
        "childTechnologies": [],
        "parentTechnologies": []
      }
    ]
  }
}
Where it should be
Copy code
{
  "data": {
    "technologies": [
      {
        "id": "techA",
        "name": "My Technology Updated",
        "childTechnologies": [
          {
            "id": "techB"
          }
        ],
        "parentTechnologies": []
      },
      {
        "id": "techB",
        "name": "Another Technology",
        "childTechnologies": [],
        "parentTechnologies": [
          {
            "id": "techA"
          }
        ]
      }
    ]
  }
}
n
l
Your relation name is the same... could that be the issue?