public function generate()
 {
     // Sets only the entity name as the name of the class
     $this->setNameFormatFull(false);
     $properties = array();
     foreach ($this->getTable()->getColumns() as $column) {
         $properties[] = new PropertyGenerator($column->getName(), null, PropertyGenerator::FLAG_PROTECTED);
     }
     $this->setProperties($properties);
     return parent::generate();
 }
 public function generate()
 {
     $properties = array();
     $properties[] = new PropertyGenerator('table', $this->getTableName(), PropertyGenerator::FLAG_PROTECTED);
     $properties[] = new PropertyGenerator('pk', $this->getPrimary(), PropertyGenerator::FLAG_PROTECTED);
     // If the pk of the table has a sequence, then I will create a Sequence name for the pk
     foreach ($this->getTable()->getColumns() as $column) {
         if ($column->getName() !== $this->getPrimary()) {
             continue;
         }
         // If the column has a sequence, The default value
         $needle = "nextval('";
         $default = $column->getColumnDefault();
         $pos = strpos($default, $needle);
         if ($pos !== false) {
             // It means it has a sequence
             // Now I am going to get the sequnece name
             $name = substr($default, strlen($needle), strpos($default, "'", strlen($needle) + 1) - strlen($needle));
             $properties[] = new PropertyGenerator('sequenceName', $name, PropertyGenerator::FLAG_PROTECTED);
         }
     }
     $this->setProperties($properties);
     return parent::generate();
 }
 public function generate()
 {
     // Create entry on config/module.config.php
     $this->updateModuleConfig();
     return parent::generate();
 }
 public function generate()
 {
     return parent::generate();
 }