Many-to-many relationship table doesn’t work with varchar primary keys
-
Hi Peter,
I’ve again tested many-to-many relationships using the plugin version 4.5.7, and my conclusion is, that NO relationship is displayed when using varchars as Primary Key in the bridged table.
Example: In my test I relate one table “Language” with primary keys of type varchar(2) (e.g. en, de, fr, etc.) with another table “Translation Master” of strings using Integer as primary key and create the bridged table as follows (compound keys).
language_id | tm_id
————|——
en | 1
de | 1
…
However, the plugin doesn’t show any relations after adding the links in the corresponding “Project Templates”.
Only after introducing an integer as “language_id” the desired functionality could be obtained:
language_id | tm_id
————|——
1 | 1
2 | 1
…`
Since I haven’t read, that using varchar is not allowed or bad practice, I wonder whether this behavior is intended or not?
Thank you for this great plug-in! Best, Alex.
- The topic ‘Many-to-many relationship table doesn’t work with varchar primary keys’ is closed to new replies.