Quick Tip: Noloco MySQL Join Tables Need Three Columns
I recently discovered something helpful when setting up join tables in my Noloco MySQL implementation that wasn’t immediately obvious to me.
The Issue & Solution
My join table with just two foreign key columns wasn’t being recognized properly by Noloco. After contacting support, I learned that join tables should have three columns: an ID column plus the two foreign keys.
Once I added the primary key ID column, everything worked perfectly!
Important Note About Reserved Names
Remember that Noloco has reserved field names including id
, createdAt
, updatedAt
, and uuid
. When you add an id
column to your join table, Noloco will rename it to “[Table Name] Id” in the interface, but this renaming doesn’t affect functionality.