Fix hasMany custom keys join table (#510)