I’m using an SQLite DB that has a BOOL column. Inserting into the DB works fine and true is recorded as 1 and false as 0 in the BOOL field. But on the query I get the following error: Can not convert output type (7) of database column ‘isLegalEntity’ to internal type ‘Boolean’
The class I’m returning the query results to has an attribute isLegalEntity of type Boolean [Base Types].
If you want to have Boolean in the model you need to use TEXT (or other type which maps to TEXT storage class http://www.sqlite.org/datatype3.html) in the database. True maps to “1” and false to “0” in the database.
If you want to use BOOL in the SQLite database you have to use Integer in the model.