N:M Check associations is not working as mentioned in the docs
See original GitHub issueWhat are you doing?
// code here
From Sequelize docs
// check if all associated objects are as expected:
// let's assume we have already a project and two users
project.setUsers([user1, user2]).then(() => {
return project.hasUsers([user1]);
}).then(result => {
// result would be false
return project.hasUsers([user1, user2]);
}).then(result => {
// result would be true
})
What do you expect to happen?
It must work as documented
What is actually happening?
Not working as documented
// Example Scenario
Returns true instead of false for this scenario
If project as 2 users user1, user2
project.hasUsers([user1]); // => returns true instead of false
__Dialect : Mysql __Database version: 5.7 __Sequelize version:__4.13.5
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
SequelizeJS N:M Check associations is not working as ...
This example from sequelizeJS docs is not working as mentioned. Here is the link. // check if all associated objects are as expected: ......
Read more >Advanced M:N Associations | Sequelize
This shows that one Many-to-Many relationship isn't very different from two One-to-Many relationships. The tables in the database look the same. The only ......
Read more >Home - NM RLD
Verify a license Verify your professional is licensed before using their services. Check if they have any disciplinary actions against them.
Read more >Inspection of Public Records Act - New Mexico Attorney General
“public records” means all documents, papers, letters, books, maps, tapes, photographs, recordings and other materials, regardless of physical form or ...
Read more >Corporations and Business Search - SOS Portal
Registration/Reservation No.: ... Welcome to the Business Search screen where you may search for entities registered in New Mexico. In order to search...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed https://github.com/sequelize/sequelize/commit/bf7a55babf4a8aacbf05c30c3ac6ef549fe14ffa
Sure . here