Hello, I come to ask a question about associations and the foreign key. In the conventions of CakePHP, it is indicated to use a numerical value (example game_id). I would like to know if it is a bad practice to defend a varchar for a foreign key, knowing that the varchar will never change value.
I know it is possible to do this because I have already experienced it, but I do not know if this is a good way to do with CakePHP.
I need a varchar for the foreign key to put a condition on the association. For example, the table taxonomies to the terms table to the table items.
'className' => 'Terms',
'conditions' => 'Terms.taxonomy_name' => 'category',
'foreignKey' => 'category_id'