I have two MYSQL Schemas, and they, should will work together.
IE: The "user" table lives in the schema "a" and the "profile" table lives in the schema "b".
Profile -> has many users
Users -> belongs to Profile
Is posible define associations between two models that live in different schemas by this way in Sequelize js?
// after define the models ..
Profile.hasMany(User);
User.belongsTo(Profile);
// get the profile of the user(from the b schema)
User.find(1).success( function(user) {
console.log(user.getProfile());
});
This will work?
How i should define the models form differents schemas?