I have a kind of theory question. Suppose I have a...
# orm-help
j
I have a kind of theory question. Suppose I have a user object, and that user object has a node called cart. That cart is a collection of CartItem objects. There is a 1-many relation between user and cartItems.
Copy code
type CartItem {
  id: ID! @unique
  quantity: Int! @default(value: 1)
  owner: PortalUser! @relation(name: "ItemOnUser")
  productId: ID!
  createdAt: DateTime!
  updatedAt: DateTime!
  dummy: String! @default(value: "Dummy")
}

type PortalUser {
  portalId: String! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  cart: [CartItem!]! @relation(name: "ItemOnUser", onDelete: CASCADE)
  isGuest: Boolean! @default(value: "true")
  dummy: String! @default(value: "Dummy")
}
Now I want to import a cart form one user to another. I’d like to run something like
Copy code
`
updateManyCartItems(where: 
  {
    owner: oldOwner
  } data {
   owner: newOwner
  })
But I cannot batch edit the owners of cartItems (it’s just not an option under updateManyCartItems’ data arg). Why is this? I am sure this is trying to tell me something, but I am not sure what I should be learning from it. Thanks!