BoD/android-contentprovider-generator

Code doesn't compile with non-nullable boolean field

caarmen opened this issue · 1 comments

I added a non-nullable field is_favorite to my db. In order for the content provider to compile, I had to make this change:

-
-    public PoemSelection isFavorite(boolean... value) {
-        addEquals(PoemColumns.IS_FAVORITE, toObjectArray(value));
-        return this;
-    }
-
-    public PoemSelection isFavoriteNot(boolean... value) {
-        addNotEquals(PoemColumns.IS_FAVORITE, toObjectArray(value));
+    public PoemSelection isFavorite(boolean value) {
+        addEquals(PoemColumns.IS_FAVORITE, value ? new Object[] { "1" } : new Object[] { "0" });
         return this;
     }
BoD commented

Resolved.