cannot query for new bool property default value

Issue

I have an existing database, and if I define a new bool hide_in_main_screen = false; property in my objectbox class, and I query it like Store.box<TM>().query(TM_.hide_in_main_screen.equals(false)).build().find(), I got 0 items.
If I query the whole table I see that this property value is false.

Why I don’t get the items, and how can I solve this problem?

Solution

Based on this objectbox issue information, I created a db migration routine and filled the new properties with default values.

Answered By – Ebadta

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *