How to force createdAt on model.create #1661
Unanswered
karlbernard2
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are trying to duplicate records and we want to preserve the original createdAt. Right now it seems that passing createdAt as a field will not force that value and it will automatically use current creation date.
It works if we perform an update on the newly created record, but we'de prefer not having to perform 2 queries on 1000s of records.
Is there a way around that to overwrite the automatically set createdAt on creation?
Beta Was this translation helpful? Give feedback.
All reactions