Replies: 2 comments 1 reply
-
|
On the update method, there is an argument called allowExplicitTimestamps. You can set that to true and force the old updatedAt like so: post = model("post").findByKey(params.key);
post.update(
createdAt=post.createdAt,
updatedAt=post.updatedAt,
deletedAt=post.deletedAt,
properties=PARAMS.post
);This example of course assumes the post params you need to update are coming in through a post struct in your PARAMS. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, I misunderstood. The cleanliness: allowExplicitTimestamps is part of the update() function — I have this code, but it doesn’t work. local.user = model("user").findByKey(key=session.user.id); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I need to update some records without triggering the automatic updatedAt timestamp. Is there a way to do this?
Thank you in advance.
V 2.5.1
Beta Was this translation helpful? Give feedback.
All reactions