Skip to content

Commit

Permalink
Merge pull request #150 from marcteyssier/3.4
Browse files Browse the repository at this point in the history
Fix dao generation to set null value in datatime
  • Loading branch information
moufmouf committed Jul 17, 2017
2 parents 6a587e6 + b82a28f commit 82f8aff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mouf/Database/TDBM/Utils/TDBMDaoGenerator.php
Expand Up @@ -201,7 +201,7 @@ public function '.$columnGetterName.'() {
* @dbColumn '.$column->name.'
* @param '.($castDatesToDateTime?'\\DateTimeImmutable|null':'timestamp|null').' $'.$column->name.'
*/
public function '.$columnSetterName.'('.($castDatesToDateTime?'\\DateTimeImmutable ':'').'$'.$column->name.') {
public function '.$columnSetterName.'('.($castDatesToDateTime?'\\DateTimeImmutable ':'').'$'.$column->name.($castDatesToDateTime?' = null':'').') {
if($'.$column->name.' === null) {
$this->__set(\''.$column->name.'\', null);
} else {';
Expand Down Expand Up @@ -906,4 +906,4 @@ public function setRootPath($rootPath)
{
$this->rootPath = $rootPath;
}
}
}

0 comments on commit 82f8aff

Please sign in to comment.