![]() |
Hello guys.
I am using CI4 (auto) Model. I want to prevent auto-update of created_at and updated_at in my database table so I can set the values manually. The problem is for example, the 'created_at' and 'updated_at' fields are both updated with the current timestamp, and in so doing, the original date and time a user registers an account is changed, and my application loses track of the original timestamp. I have followed the documentation about $useTimestamps, $createdField, $updatedField exactly...even leaving both $createdField and $updatedField empty (as instructed in the documentation) and I'm still not able to prevent the auto-update. Any help anyone please? Thanks ahead! ![]() ![]() ![]()
Thank you @paulbalandan. Have you had any need to want to achieve same?
I did that, but no way. That's the reason I showed up here if anyone has had any experience with it, and if there's a resolution. Let's hope I'm right though. It is SOLVED!!! Took a deeper look at my CI Model class...my $beforeInsert and $beforeUpdate callbacks (or I ![]() |
Welcome Guest, Not a member yet? Register Sign In |