use foreignKey to check for hasMany or manyToMany
pass both columns to build foreignKey function