Ejemplo n.º 1
0
 protected function generateEntityProperty(\DibiColumnInfo $column, $pks)
 {
     $params = array('name' => $name = $column->getName(), 'type' => $type = $column->getType(), 'size' => $column->getSize(), 'nullable' => $column->isNullable() ? true : false, 'default' => is_null($default = $column->getDefault()) ? NULL : $default);
     if (in_array($name, $pks)) {
         $params['primary'] = true;
         if ($column->isAutoincrement()) {
             $params['autoincrement'] = true;
         }
     }
     return ' * @Column(' . Metadata\Annotations::serializeArray($params) . ')' . "\n";
 }