As the title of this issue, JTable can't update the field to NULL
public function store($updateNulls = false)
public function store($updateNulls = true)
Joomla 3.9.16
Database: 5.7.29-0ubuntu0.18.04.1
Php: 7.2.28-3+ubuntu18.04.1+deb.sury.org+1
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-13 06:42:45 |
Closed_By | ⇒ | richard67 |
In Version 3 and before Joomla uses pseudo null date values (‘0000-00-00 00:00:00’ on MySQL and ‘1970-01-01 00:00:00’ on PostgreSQL) because real null values for datetimes wasn’t supported in old times on MySQL. This has been corrected in the 4.0-dev branch and so will be correct with Joomla 4. This uses real null values for datetimes. Closing as no issue.
P.S.: Changing that in J3 would cause hard backward compatibility (b/c) breaks at many places.
The updateNulls parameter determines if null values are stored for table fields of type datetime (or on PostgreSQL: time stamp without time zone). Null values for datetimes are supported for J4 but not for J3. So this here is no issue, I think.