Uwe (ObjectBox)
Uwe (ObjectBox)
Thanks! Note that for now you can add a converter class, e.g. ```java import java.time.Instant; import java.util.Date; /** * Converts an {@link Instant} to a {@link Date} to store in...
Use `.toEpochMilli()` for the query. Like `Date` the time is internally stored as a `Long` integer.
If you mark a field as `transient` ObjectBox will ignore it as well. But every entity class is required to have a `@Id` property. Edit: it is best to have...
Does your code supply the database file? Does it somehow (delete and) create the database file? Note that on Android ObjectBox stores the database file in the app's files folder.
What @greenrobot meant was that the database is likely corrupted. Try to write code that catches the exception, then deletes the broken file. Then try to create a new BoxStore....
@hzhyan If you have none already, we have published example code on how to safely get a copy of the database file and offer users to share it via email....
Thanks for sharing, I'll have a look (at some point)! Though I'd say this is an enhancement request, not a bug. More details from duplicate #1020: ``` - Plugin 'io.objectbox':...
Since `1.0.1` there is [an experimental feature to set a comparator](http://objectbox.io/changelog/) on the `ToMany` that orders its items: ``` orders.setComparator(new Comparator() { @Override public int compare(Order left, Order right) {...
If you [look at the code for `ToMany` the comparator is used when entities are first loaded](https://github.com/objectbox/objectbox-java/blob/master/objectbox-java/src/main/java/io/objectbox/relation/ToMany.java#L173) into the `ToMany`. So just make sure to set the comparator before accessing...
Related issue: #243.