doctrine / orm

Doctrine Object Relational Mapper (ORM)
https://www.doctrine-project.org/projects/orm.html
MIT License
9.86k stars 2.5k forks source link

Feature Request: Add new event \Doctrine\ORM\Tools\ToolEvents::postGatherRelationsSql, allow to custom relationship table. #11457

Open ywisax opened 1 month ago

ywisax commented 1 month ago

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

Current version, doctrine/orm will generate a relationship table contains only two column(just like user_id, role_id). It is hard for developer to extends this table, like add create time column, create user id and so on. Add new \Doctrine\ORM\Tools\ToolEvents::postGatherRelationsSql and trigger in \Doctrine\ORM\Tools\SchemaTool::gatherRelationsSql, then developer can write custom logic for they owned.