How to describe multi-column foreign key in Doctrine mapping
问题 We have a database schema that, in simplified (slightly contrived) form, looks like: Where the foreign key from users to domains is set on columns (domainId, groupId), to guarantee referential integrity. This structure works fine for the intended purpose. However, for a new application talking to the same database, I now need to create a mapping for Doctrine that maps the above structure, including the Foreign Key relation on two columns. I've tried the following: <entity name="User" table=