Skip to content

Commit

Permalink
Not updating if field is the default value on insertOrUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
phpfui committed Dec 22, 2023
1 parent 97fa391 commit f0ecaff
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/PHPFUI/ORM/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -897,11 +897,6 @@ private function privateInsert(bool $updateOnDuplicate, string $ignore = '') : i
{
$definition = static::$fields[$key];

if (\array_key_exists(self::DEFAULT_INDEX, $definition) && $value === $definition[self::DEFAULT_INDEX])
{
continue;
}

if (! \in_array($key, static::$primaryKeys))
{
$updateSql .= $comma . '`' . $key . '` = ?';
Expand Down

0 comments on commit f0ecaff

Please sign in to comment.