That’s what I figured :/
Is that fk issue what’s causing DataMapper to think there is a many-to-many relationship
Datamapper contains logic to see how the relationship is defined, as it supports join tables even for one-to-one relations.
It does that by looking at the PK’s and FK’s in the relationship definition, and if they are not found in the related tables, assume you have a join table that contains the FK’s.
This is the case here, as the generated FK is wrong so it can’t be found.