saintsystems / odata-client-php

OData Client Library for PHP
MIT License
141 stars 103 forks source link

Fails where My_Boolean eq true #110

Closed johshej closed 2 years ago

johshej commented 2 years ago

Hi.

I can't find a proper way to use booleans in where statements.

This failes: $query->where('My_Boolean', 'true'); The filter query becomes: ... My_Boolean eq 'true' ..., but it has to be ... ... My_Boolean eq true ....

I can sometimes make it work with: $query->where('My_Boolean eq true'); But the filter query becomes: ... My_Boolean eq true eq null.... It does not always work and I guess it shouldn't.

johshej commented 2 years ago

Found the answer. It looks like I can just do a $query->where('My_Boolean', true);