update to better support join tables in self referencing associations
use foreignKey to check for hasMany or manyToMany
pass both columns to build foreignKey function
update table name ordering