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

findAndCountAll with null nested field #6123

Closed
vangoz opened this Issue Jun 17, 2016 · 1 comment

Comments

2 participants
@vangoz

vangoz commented Jun 17, 2016

I need to left join to a table and check with is null, so I do it with nested field.

clause.include = [{
  model: 'Table',
  required: false
}]
clause.where['$Table.x$'] = null;

The query works as expected with findAll(), however with findAndCountAll() it returns error
The multi-part identifier \"Table.x\" could not be bound.".

I think it happens because the count query does not do the actual join because of required: false.

@janmeier

This comment has been minimized.

Member

janmeier commented Jun 22, 2016

Please create a complete SSCCE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment