diff --git a/Gii/GiiModel.php b/Gii/GiiModel.php index a1d63063..053e8fe9 100644 --- a/Gii/GiiModel.php +++ b/Gii/GiiModel.php @@ -129,8 +129,14 @@ class ' . $managerName . ' extends ActiveRecord if ($key == 'primary') { continue; } - $html .= ' + + if ($property->hasType()) { + $html .= ' + ' . $debug . ' ' . $property->getType() . ' $' . $key . ' = ' . $val . ';' . "\n"; + } else { + $html .= ' ' . $debug . ' $' . $key . ' = ' . $val . ';' . "\n"; + } } }