feat(associate): routes to associate objects with each other

This commit is contained in:
Mahdi Dibaiee
2016-01-20 12:47:47 +03:30
parent e647922678
commit 5e0eeccbac
5 changed files with 48 additions and 3 deletions

View File

@ -50,6 +50,9 @@ const register = (server, options = {}, next) => {
associations.oneToMany(server, source, target, options);
associations.oneToMany(server, target, source, options);
}
associations.associate(server, source, target, options);
associations.associate(server, target, source, options);
} catch(e) {
// There might be conflicts in case of models associated with themselves and some other
// rare cases.