-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bug: Empty Entity date attributes receive current timestamp when accessed #3251
Comments
This is expected, because |
Thanks for the feedback but I still believe this is a framework issue. Imagine this scenario: I have a table Process with column startedOn in my database. When this column is empty, it indicates a process that hasn't started yet. My processes never get started because even though in the database they have no startup date specified, CodeIgniter substitutes my empty value with the current timestamp. Bottom line, if a column is empty in the database, the respective attribute in your Entity must be empty as well. |
I will submit a PR based on your suggestion, but whether to merge or not depends on the judgment of the administrator. |
I think the expectation is that you would use |
Yeah, that would indeed be the expectation - except my database engine (FileMaker) doesn't recognize |
Well... I believe that in the Entity class we have a special use for the empty string and it should not be changed. @JanZelenka If your database is specific and there is no support for An empty string should still be supported and return the current date - this is expected behavior. |
I have the following scenario:
CodeIgniter 4 version: 4.0.3
Affected module: Entity class
PHP version: 7.2
The text was updated successfully, but these errors were encountered: