Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 'updated_at' when enabled in replace() #4684

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

paulbalandan
Copy link
Member

Description
Fixes #4624
Supersedes and closes #4662

Checklist:

  • Securely signed commits

@paulbalandan paulbalandan force-pushed the replace-timestamps branch 3 times, most recently from b597d75 to 05b79ca Compare May 17, 2021 17:25
@MGatner
Copy link
Member

MGatner commented May 25, 2021

What's happening with this? Why are we all failing at this issue... 🤦‍♂️

@paulbalandan
Copy link
Member Author

The Postgre builder actually has a bug which I discovered that testMode will make replace still execute the SQL. For Sqlsrv, I am not sure where went wrong. I am still to setup sql server locally so I can see this thru xdebug.

@MGatner
Copy link
Member

MGatner commented Jun 3, 2021

😭

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what happened there but it's working now and I'm happy.

Copy link
Contributor

@sfadschm sfadschm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the check for $data in the if statement still needed?

@paulbalandan
Copy link
Member Author

Is the check for $data in the if statement still needed?

You mean the validation part? I think so because replace is like update, isn't it? Why do you think it's not needed anymore?

system/BaseModel.php Outdated Show resolved Hide resolved
@paulbalandan paulbalandan merged commit 0c2a811 into codeigniter4:develop Sep 8, 2021
@paulbalandan paulbalandan deleted the replace-timestamps branch September 8, 2021 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: $model->replace() not generated timestamp
3 participants