We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Cannot query for related objects where the relation is NULL.
For example,
prod.manager.find(Book, { where: { author: IsNull(), }, relations: ["author"], })
Will simply query for all books (not adding any where relationship for "authorId IS NULL").
We would add the relationship of "authorId IS NULL".
We do not add the relationship of "authorId IS NULL".
MacOS, TypeORM 0.35
Postgres
The text was updated successfully, but these errors were encountered:
The fix for this is in #9031
If you want a quick fix for this just go into node_modules/typeorm/query-builder/SelectQueryBuilder.js and add his code from this: https://github.com/typeorm/typeorm/pull/9031/files#diff-52bea788267888fdbb5f795f0dfb61504f16bd43e0afdfa28848abb4435121b5
node_modules/typeorm/query-builder/SelectQueryBuilder.js
I'm doing my builds locally so it's no issue for me but I would consider this a critical bug so hopefully this PR can get shipped soon.
Sorry, something went wrong.
duplicate of #8890
Many-To-Many find where Relation is Null still not working..
No branches or pull requests
Issue Description
Cannot query for related objects where the relation is NULL.
For example,
prod.manager.find(Book, {
where: {
author: IsNull(),
},
relations: ["author"],
})
Will simply query for all books (not adding any where relationship for "authorId IS NULL").
Expected Behavior
We would add the relationship of "authorId IS NULL".
Actual Behavior
We do not add the relationship of "authorId IS NULL".
Steps to Reproduce
My Environment
MacOS, TypeORM 0.35
Relevant Database Driver(s)
Postgres
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: