Doctrine2 Map entities with composite foreign keys in the composite primary keys
问题 I have a model which has many tables, but in this case we only need three. The point is that the composite primary key of one is also the foreing key (composite too) and Symfony throws this exception: MappingException: It is not possible to map entity 'Your\SomethingBundle\Entity\Empleado' with a composite primary key as part of the primary key of another entity 'Your\SomethingBundle\Entity\EmpleadoHorario#empleado' . Here I explain the relationship: 1º Salon, it has a primary key ID 2º