Doctrine 2 - ORM

\Doctrine\ORM\Mapping\DatabaseDriver::loadMetadataForClass fails to detect primary key when primary key is also a foreign key