0
I have a database that works with composite keys, and I am implementing the use of laravel framework.
This is my bank’s structure:
I’m using the Doctrine as ORM and discovered that I can not automatically generate the entities of the bank, since the tables have composite keys. I’m using the remote php artisan doctrine:convert:mapping annotation ./entidades --from-database --force
. The return to this command is :
[Doctrine\ORM\Mapping\MappingException]
It is not possible to map entity 'FinContaspagar' with a composite primary key as part of the primary key of another entity 'FinContaspagarDetalhe#grupo'.
This way, I am creating the entities manually, however I followed the tutorial of Doctrine in relation to the creation of @ManyToOne @OneToMany
but I still haven’t been able to create the relationship the right way. Does anyone know a way or tool to generate these entities or has some example like this of several composite keys?