So if I have this, is there an easy way to tell pr...
# orm-help
v
So if I have this, is there an easy way to tell prisma "mark the
content
item as also updated". I can't manually update the
updatedAt
field
c
This should be automatically done by prisma.
But,
updatedAt
is update on
updateComment
not on createComment. On createComment
updatedAt
===
createdAt
.
Is a logical assert
createType => updatedAt === createdAt
(both are created with the same value)
updateType => updatedAt !== createdAt
(only updatedAt field will be updated)
v
yeah I get that, i'm talking about updating the
content
field which the comment was connected to
c
You're doing something wrong and I think that is not possible.
Because you're trying to "hack" since connect/create is not an update event 🙂
instead of
Copy code
type Comment {
    id: ID! @unique
    user: User!
    content: Content!
}

type Content {
    id: ID! @unique
    whatever: String!
}
go with
Copy code
type Comment {
    id: ID! @unique
    user: User!
    content: String!
}
v
that'll work, thanks