Solves Doctrine ORM Error with tables without Primary Key on MySQL when mapping the database.

This error:
Table ____ has no primary key. Doctrine does not support reverse engineering from tables that don’t have a primary key.

So.
Doctrine can not work on tables that have no primary key. In MySQL, create tables without PK will always be a bad idea, but, in some cases (or legacy systems) that not have PKs on some tables, you still can use Doctrine as ORM.

However, by default (and I believe this will not change) if your database has tables without primary key Mapping simply will not work =/ .

The more fast way to solve this is override the vendor class DatabaseDriver, in the namespace:

namespace Doctrine\ORM\Mapping\Driver; 

On line 277, change:

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();

To avoid any future problems, after mapping your database, return the settings to avoid any problem later.
Good luck!