Using BeforeInsert or BeforeUpdate hooks to change a column value. How to? #244
Unanswered
frederikhors
asked this question in
Q&A
Replies: 1 comment 5 replies
-
There is an idea to add It should be possible with existing hooks too, but it is not trivial - see https://github.com/uptrace/bun/blob/master/example/model-hooks/main.go#L68-L97 |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use the
BeforeInsertHook
like in the example below:But I cannot find a way.
What should I use?
UPDATE: I think we should update the docs too for this case.
Beta Was this translation helpful? Give feedback.
All reactions