Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case for scope with includes #3991

merged 1 commit into from Jul 25, 2015

Add test case for scope with includes #3991

merged 1 commit into from Jul 25, 2015


Copy link

@ackerdev ackerdev commented Jun 23, 2015

There seem to be some issues preventing use of includes inside scope definitions. These tests should reproduce the problems.

WIP, I'll be abusing the PR system for travis-ci checking.

@janmeier janmeier self-assigned this Jun 28, 2015
Copy link

@janmeier janmeier commented Jul 25, 2015

The problem was that we didn't call conformOptions (converting the include to the form expected later on) when a scope is a function

return {
include: [{
model: sequelize.models.Company,
include: [sequelize.models.Project.scope('active')]
Copy link

@janmeier janmeier Jul 25, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this to .project - the models are stored under their name :)

@janmeier janmeier merged commit 4fecbbc into sequelize:master Jul 25, 2015
1 check failed
janmeier added a commit that referenced this issue Jul 25, 2015
Add test case for scope with includes
@ackerdev ackerdev deleted the scope-include-tests branch Jul 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants