spotorm / spot2

Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer
http://phpdatamapper.com
BSD 3-Clause "New" or "Revised" License
601 stars 101 forks source link

Example of IS NOT NULL #278

Closed dertin closed 5 years ago

dertin commented 5 years ago

Hello, how can I include a condition of IS NOT NULL ? $mapperTest->all()->where(['Foo <>' => null]);

FlipEverything commented 5 years ago

I think it should work. What does it do? What does ->toSql() say?

FlipEverything commented 5 years ago

I tested it in my own code and 100% positive that it works for me like that:

$this->_mapper->where(['email <>' => NULL]);

Feel free to reopen this if you need further assistance (and please provide details). Thank you!