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

An error in methods "find" and the like. It does not work for NULL sampling #219

Closed
Fokir opened this issue Jan 21, 2017 · 3 comments
Closed
Labels

Comments

@Fokir
Copy link

Fokir commented Jan 21, 2017

There is one unpleasant feature in the use of the method "find". When all the elements of the sample with the field set to "NULL" is requested.
... WHERE user.email = null
This request does not work in MySQL, but works request.
... WHERE user.email IS null

@pleerock
Copy link
Member

can you provide a code snippet how did you get this code generated? via FindOptions?

@pleerock pleerock added the bug label Jan 21, 2017
@Fokir
Copy link
Author

Fokir commented Jan 21, 2017

Now I have done so
let user = await User.__repository.createQueryBuilder('user').where('user.uplay = :uplay', {uplay: uplay}) .andWhere('user.email is null').andWhere('user.password is null').getOne();
It has previously been
let user = await User.__repository.findOne({uplay: uplay, email: null, password: null})

@pleerock
Copy link
Member

fixed, will be released in 0.0.8-alpha.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants