Releases: objectbox/objectbox-java
Releases · objectbox/objectbox-java
V5.0 - Sync Filters
Sync
- Enables User-Specific Data Sync in combination with Sync Server version 5.0+.
- Support configuring Sync filter variables on
SyncClient.
Regular updates
- Update runtime libraries for Android and JVM to database version
5.0.0-2025-09-27.- Android: Prior to Android 8.0, don't crash when inserting objects with string lists whose size exceeds the local
reference table size. #1215 - ToOne relations: when deleting an object with an ID larger than the maximum 32-bit unsigned integer
(4_294_967_295) that is used as the target object of a ToOne, correctly re-set the target ID of the ToOne to
0. objectbox-dart#740
- Android: Prior to Android 8.0, don't crash when inserting objects with string lists whose size exceeds the local
- Fix a race condition with a closing store and still active transactions that kept the store from closing.
For Android this may fix some rare ANR issues. - When re-creating a
BoxStorefor the same directory andclose()wasn't called on the previous instance, don't throw
an "Another BoxStore is still open for this directory" exception. Note that callingclose()is recommended before
creating a new instance. #1201 - When using
BoxStoreBuilder.buildDefault(), don't leak the Store when setting it as default fails. - To help diagnose, print stacks of all threads in the internal thread pool if shutting it down takes too long when
closingBoxStore. - Remove deprecated APIs:
Query.setParametersmethods that set a single parameter, use thesetParametermethods instead.Box.removeByKeys, useBox.removeByIdsinstead.BoxStore.sizeOnDisk, usegetDbSizeorgetDbSizeOnDiskinstead which properly handle in-memory databases.BoxStoreBuilder.debugTransactions, usedebugFlags(DebugFlags.LOG_TRANSACTIONS_READ | DebugFlags.LOG_TRANSACTIONS_WRITE)instead.SyncServerBuilderpeerconfiguration options, use theclusterPeeroptions instead.io.objectbox.DebugFlags, useio.objectbox.config.DebugFlagsinstead.ValidateOnOpenModeconstants, useValidateOnOpenModePagesinstead.- DAOcompat compatibility query methods. Use the regular query API instead.
V4.3.1
V4.3.0
- Basic support for boolean array properties (
boolean[]in Java orBooleanArrayin Kotlin). - The Windows database library now statically links the MSVC runtime to avoid crashes in incompatible
msvcp140.dll
shipped with some JDKs. - External property types (via MongoDB connector):
- add
JSON_TO_NATIVEto support sub (embedded/nested) documents/arrays in MongoDB - support ID mapping to UUIDs (v4 and v7)
- add
- Admin: add class and dependency diagrams to the schema page (view and download).
- Admin: improved data view for large vectors by displaying only the first elements and the full vector in a dialog.
- Admin: detects images stored as bytes and shows them as such (PNG, GIF, JPEG, SVG, WEBP).
Sync
- Add "Log Events" for important server events, which can be viewed on a new Admin page.
- Detect and ignore changes for objects that were put but were unchanged.
- The limit for message size was raised to 32 MB.
- Transactions above the message size limit now already fail on the client (to better enforce the limit).
V4.2.0
- Add new query conditions
equalKeyValue,greaterKeyValue,lessKeyValue,lessOrEqualKeyValue, and
greaterOrEqualKeyValuethat are helpful to write complex queries for string maps.
These methods supportString,longanddoubledata types for the values in the string map. - Deprecate the
containsKeyValuecondition, use the newequalKeyValuecondition instead. - Android: to build, at least Android Plugin 8.0 and Gradle 8.0 are required.
V4.1.0
- Vector Search: add new
VectorDistanceType.GEOdistance type to perform vector searches on geographical coordinates.
This is particularly useful for location-based applications. - Android: require Android 5.0 (API level 21) or higher.
- Note on Windows JVM: We've seen crashes on Windows when creating a BoxStore on some JVM versions.
If this should happen to you, make sure to update your JVM to the latest patch release
(8.0.432+6, 11.0.25+9, 17.0.13+11 and 21.0.5+11-LTS are known to work).
Sync
- Add JWT authentication
- Sync clients can now send multiple credentials for login
V4.0.3
- Make closing the Store more robust. In addition to transactions, it also waits for ongoing queries. This is just an
additional safety net. Your apps should still make sure to finish all Store operations, like queries, before closing it. - Flex properties support
nullmap and list values. - Some minor vector search performance improvements.
Sync
- Fix a serious regression, please update as soon as possible.
- Add new options, notably for cluster configuration, when building
SyncServer. Improve documentation.
Deprecate the old peer options in favor of the new cluster options. - Add
SyncHybrid, a combination of a Sync client and a Sync server. It can be used in local cluster setups, in
which a "hybrid" functions as a client & cluster peer (server).
V4.0.2
- Add convenience
oneOfandnotOneOfconditions that acceptDateto avoid manual conversion usinggetTime(). - When
BoxStoreis closing, briefly wait on active transactions to finish. - Guard against crashes when
BoxStorewas closed, but database operations do still occur concurrently (transactions are still active).
V4.0.1
- Examples: added Vector Search example that demonstrates how to perform on-device approximate nearest neighbor (ANN) search.
- Revert deprecation of
Box.query(), it is still useful for queries without any condition. - Add note on old query API methods of
QueryBuilderthat they are not recommended for new projects. Use the new query APIs instead. - Update and expand documentation on
ToOneandToMany.
V4.0.0 - Vector Search
ObjectBox now supports Vector Search to enable efficient similarity searches.
This is particularly useful for AI/ML/RAG applications, e.g. image, audio, or text similarity. Other
use cases include semantic search or recommendation engines.
Create a Vector (HNSW) index for a floating point vector property. For example, a City with a
location vector:
@Entity
public class City {
@HnswIndex(dimensions = 2)
float[] location;
}Perform a nearest neighbor search using the new nearestNeighbors(queryVector, maxResultCount)
query condition and the new "find with scores" query methods (the score is the distance to the
query vector). For example, find the 2 closest cities:
final float[] madrid = {40.416775F, -3.703790F};
final Query<City> query = box
.query(City_.location.nearestNeighbors(madrid, 2))
.build();
final City closest = query.findWithScores().get(0).get();For an introduction to Vector Search, more details and other supported languages see the
Vector Search documentation.
- BoxStore: deprecated
BoxStore.sizeOnDisk(). Instead use one of the new APIs to determine the size of a database:BoxStore.getDbSize()which for a file-based database returns the file size and for an in-memory database returns the approximately used memory,BoxStore.getDbSizeOnDisk()which only returns a non-zero size for a file-based database.
- Query: add properly named
setParameter(prop, value)methods that only accept a single parameter value, deprecated the oldsetParameters(prop, value)variants. - Sync: add
SyncCredentials.userAndPassword(user, password). - Gradle plugin: the license of the Gradle plugin has changed to the GNU Affero General Public License (AGPL).
V3.8.0
- Support creating file-less in-memory databases, e.g. for caching and testing. To create one use
inMemory()when building aBoxStore:See thestore = MyObjectBox.builder() .androidContext(context) .inMemory("test-db") .build();
BoxStoreBuilder.inMemory()documentation for details. - Change
BoxStore.deleteAllFiles()to support deleting an in-memory database. - The
maxDataSizeInKByte()option when building a store is ready for production use. This is different from the existingmaxSizeInKByte()option in that it is possible to remove data after reaching the limit and continue to use the database. See its documentation for more details. - Admin will now print a warning when it does not have permission to show the Admin notification. When testing your app on a device with Android 13 or newer, developers should manually turn on notifications to make use of the Admin notification.
- Added examples on how to use Kotlin's unsigned integer types to https://docs.objectbox.io/advanced/custom-types
- Restore compatibility with Kotlin 1.5. However, need to exclude
kotlin-stdlib1.8 fromobjectbox-kotlinas it includes classes previously in the -jdk7/-jdk8 libraries to avoid duplicate class file errors. So if not absolutely needed, we still recommend to use at least Kotlin 1.8.