Skip to content

Commit

Permalink
Merge pull request #233 from liasica/master
Browse files Browse the repository at this point in the history
Fix singularEntities not working when using cli
  • Loading branch information
schmunk42 authored Jun 6, 2018
2 parents 01d69c6 + 7101d30 commit af8574f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/model/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function generate()
foreach ($this->getTableNames() as $tableName) {
list($relations, $translations) = array_values($this->extractTranslations($tableName, $relations));
//var_dump($relations,$tableName);exit;
$className = $this->modelClass === ''
$className = $this->modelClass === '' || php_sapi_name() === 'cli'
? $this->generateClassName($tableName)
: $this->modelClass;

Expand Down

0 comments on commit af8574f

Please sign in to comment.