symfony Table has no primary key. Doctrine does not support reverse engineering from tables that don't have a primary key. code example

Example: Table has no primary key. Doctrine does not support reverse engineering from tables that don't have a primary key.

if (!$table->hasPrimaryKey()) {      // comment this Throw exception      // throw new MappingException(      // “Table “ . $table->getName() . “ has no primary key.      // Doctrine does not “.      // “support reverse engineering from tables that don’t      // have a primary key.”      // );} else {     $pkColumns = $table->getPrimaryKey()->getColumns();}And, on line 488, add: if( $table->hasPrimaryKey() ) //add this if to avoid fatalError return $table->getPrimaryKey()->getColumns();

Tags:

Misc Example