ObjectBox Docs (Java, Kotlin, Dart)
The NoSQL SQLite alternative for Mobile, IoT, and Embedded Devices. These are the official Java/Kotlin, Dart/Flutter docs for ObjectBox and Data Sync.
Our mission: bring speed and efficiency to mobile app development via enjoyable and easy-to-use native-language APIs. Store & sync objects in Java, C, Go, Kotlin, Dart, C++, Swift cross-platform, on any POSIX system, e.g. Android, iOS, Windows, Linux, or use Docker.
We'd love to get your feedback ❤️ - Community feedback has been a major source of guidance for ObjectBox. To make ObjectBox better for you, we have set up a short Anonymous Feedback Form. Please do fill this in (it literally takes 2 minutes). Every response is highly appreciated. 🙏
To rate this documentation, use the "Was this page helpful?" smiley at the end of each page. 🙃
Otherwise, feel free to open an issue on GitHub (for Java & Kotlin or Dart/Flutter) or send us your comments to contact[at]objectbox.io - Thank you! - and if you like what you see, we also appreciate a shoutout :) or GitHub star ⭐
This release includes breaking changes to generated code. If you encounter build errors, make sure to clean and build your project (e.g. Build > Rebuild project in Android Studio).
- Add
Query.copy()
andQueryThreadLocal
to obtain aQuery
instance to use in different threads. Learn more about re-using queries. #1071 - Add
relationCount
query condition to match objects that have a certain number of related objects pointing to them. E.g.Customer_.orders.relationCount(2)
will match all customers with two orders,Customer_.orders.relationCount(0)
will match all customers with no associated order. This can be useful to find objects where the relation was dissolved, e.g. after the related object was removed. - Allow using a relation target ID property with a property query. E.g.
query.property(Order_.customerId)
will map results to the ID of the customer of an order. #1028 - Do not fail to transform an entity class that contains a transient relation field when using Android Gradle Plugin 7.1 or lower.
- Restore compatibility for Android projects using Gradle 6.1. The minimum supported version for Gradle is 6.1 and for the Android Gradle Plugin 3.4. This should make it easier for older projects to update to the latest version of ObjectBox.
Using Sync? This release uses a new Sync protocol which improves efficiency. Reach out via your existing contact to check if any actions are required for your setup.
- Add
findFirstId()
andfindUniqueId()
toQuery
which just return the ID of a matching object instead of the full object. - Experimental support for setting a maximum data size via the
maxDataSizeInKByte
property when building a Store. This is different from the existingmaxSizeInKByte
property in that it is possible to remove data after reaching the limit and continue to use the database. See its documentation for more details. - Fix a crash when querying a value-based index (e.g.
@Index(type = IndexType.VALUE)
) on Android 32-bit ARM devices. #1105 - Various small improvements to the native libraries.
Using Sync? There is no Sync version for this release, please continue using version 3.2.1.
Note: V3.3.0 contains a bug preventing correct transformation of some classes, please use V3.3.1 instead.
- Gradle plugin: use new transform API with Android Plugin 7.2.0 and newer. Builds should be slightly faster as only entity and cursor classes and only incremental changes are transformed. #1078
- Gradle plugin: improve detection of applied Android plugins, improve registration of byte-code transform for non-Android Java projects, add check for minimum supported version of Gradle.
Using Sync? There is no Sync version for this release, please continue using version 3.2.1.