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
merged 1 commit into from Jul 25, 2015

Conversation

2 participants
@ackerdev
Contributor

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.

@ackerdev ackerdev force-pushed the ackerdev:scope-include-tests branch 2 times, most recently from 0bb36e6 to fc3a4b0 Jun 23, 2015

@ackerdev ackerdev force-pushed the ackerdev:scope-include-tests branch from fc3a4b0 to 4fecbbc Jun 23, 2015

@janmeier janmeier self-assigned this Jun 28, 2015

@janmeier

This comment has been minimized.

Member

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')]

This comment has been minimized.

@janmeier

janmeier Jul 25, 2015

Member

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

continuous-integration/travis-ci/pr The Travis CI build failed
Details

janmeier added a commit that referenced this pull request Jul 25, 2015

Merge pull request #3991 from ackerdev/scope-include-tests
Add test case for scope with includes

janmeier added a commit that referenced this pull request Jul 25, 2015

@ackerdev ackerdev deleted the ackerdev: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