Hi,
I'm not really sure I'm using the good terms, so I'll try to explain my problem first.
I have a cross-reference table, CompetenceCollab
, containing the associations between people and their competences. This table has two primary keys, the people's id, and the competence's id. To this point, everything is ok.
However, the new feature I have to add is the following one : people must be able to add a rating to other people's competences. Basically, this means I have to add a new table, which will contain the note, who gave it, and somehow a link to the CompetenceCollab
table. One colleague told me I can use what he called an "alternate key", defining two foreign keys, one for each primary column of CompetenceCollab
, and telling somehow the database that each rating is associated with a competence and a people.
So my questions are the following :
- first of all, do this design seems completely mad, and if it is the case, how should I do ?
- I have to use Doctrine ORM in Symfony. Is this kind of thing possible using that ? If yes, could someone provide me a way of how to define it in the YAML file ?
Thanks for the help, feel free to ask questions in the comments, I don't know if I was really that clear.