I have an Android app that uses Room. I have the following query:
@Query("SELECT * FROM model WHERE (:someInt is null)")
List<Model> myQuery(Integer someInt);
However, when I call it with a null value, it returns an empty List. The following test fails.
List<Model> models = myDao.myQuery(null);
assertFalse(models.isEmpty());
In the other hand when I try it using the following query it returns items.
@Query("SELECT * FROM model WHERE (:someInt is not null)")
Is there something that I'm missing?
I'm using Room 2.2.5.
Thanks,