Notable changes to the ObjectBox Java library.
For more insights into what changed in the database libraries, check the ObjectBox C changelog.
- Requires Android apps to compile with SDK 36 (Android 16).
- Update Android and JVM libraries to database version
6.0.0-rc-2026-11-13. - The Android database libraries no longer prevent R8 from minifying an Android app build ("Missing classes detected while running R8.").
- ToOne:
setAndPutTarget()andsetAndPutTargetAlways()actually create the relation to the source object when the target object is new (its ID is 0). - Query:
setParameters()supports flex key/value conditions with integer and floating point values, e.g. ofequalKeyValue(key, long)orgreaterKeyValue(key, double). - Queries: remove deprecated
containsKeyValue()condition, use theequalKeyValue()condition instead. - Admin: remove deprecated
AndroidObjectBrowserhelper class, useAdmininstead. - Experimental support for KSP
- Add back support for inline value classes like
UInt. - Support
@get:JvmNameto rename the getter of a property used in generated code.
- Add back support for inline value classes like
- Vector quantization with TurboQuant enables much faster searches while preserving quality. New indexes with at least 32 dimensions hold their vectors in memory as TurboQuant4 by default, which takes 1/8 of the memory of full-precision vectors. The stored vectors remain unchanged: changing the quantization requires no data migration and no re-indexing. To use another quantization, set
@HnswIndex(quantization = ...), seeVectorQuantization. Existing indexes keep running without quantization, unless they set one or are re-indexed. - Simplified configuration: instead of tuning HNSW parameters like
neighborsPerNodeandindexingSearchCountyourself, choose one of 10 levels from fast to high quality (recall).- Search levels trade search speed for quality: per query, e.g.
Doc_.embedding.nearestNeighbors(vector, 10).searchLevel(VectorSearchLevel.L6_QUALITY)orQuery.setParameterSearchLevel(), or set the default level of an index with@HnswIndex(searchLevel = ...)(default:VectorSearchLevel.L4_BALANCED). Previously, the advice was to search for more results than needed to improve quality; prefer a search level instead. - Build levels trade indexing time and memory for graph quality, for data that does not reach your recall target at the highest search levels:
@HnswIndex(buildLevel = ...), seeVectorBuildLevel. - The individual parameters remain available for fine-tuning; new are oversampling and rescoring, per query (e.g.
nearestNeighbors(...).rescoreFactor(...)orQuery.setParameterRescoreFactor()) and per index (e.g.@HnswIndex(quantizationRescoreFactor = ...)). Property.nearestNeighbors()now returnsNearestNeighborQueryCondition, which offers these search parameters. Code compiled against a previous version needs to be recompiled. The old query API (QueryBuilder) offers them as e.g.vectorSearchLevel().
- Search levels trade search speed for quality: per query, e.g.
- Late init for HNSW indexes with dimensions (and other parameters) known only at runtime, e.g. if the embedding model is chosen at runtime: flag the index with
@HnswFlags(lateInit = true)(makes@HnswIndex(dimensions)optional) and set its parameters after opening the store withBoxStore.initHnswIndex(property, HnswIndexParams); they are persisted and can be changed later (e.g. for another embedding model). To remove the objects instead of indexing them, pass anHnswInitMode.BoxStore.getHnswIndexParams()returns the parameters in effect. - Reproducible graph builds, e.g. for tests:
HnswIndexParams.randomSeed()seeds the random levels of new graph nodes (default: a random seed). - Nearest neighbor search with other conditions now returns the nearest among the matching objects (previously: the nearest of all objects, of which only the matching ones remained, often fewer than requested). Few candidates are searched by brute force; otherwise, the graph search accepts only matching objects. Both limits are tunable per index (
@HnswIndex(bruteForceMaxCandidates = ..., filteredSearchMaxNodes = ...)) and per query (e.g.nearestNeighbors(...).bruteForceMaxCandidates(...)orQuery.setParameterBruteForceMaxCandidates()). - Faster vector search, also without quantization, faster index builds and much faster removal of objects.
- The default
indexingSearchCount(efConstruction) is now 128 instead of 100. Existing indexes keep their value and are not re-indexed. - Breaking change: removed
@HnswFlags(reparationLimitCandidates). Removing objects from an HNSW index is fast now, so the database no longer supports this flag.
- New resync:
SyncClient.requestResync()reconciles a client with the server while keeping its local data and only transferring the differences (compares object IDs and content hashes; requires a server supporting Sync protocol version 12). Advanced tuning (typically not needed):SyncBuilder.resyncAssumedChanges()andSyncClient.setResyncAssumedChanges(). - Changed sync filters (e.g. changed filter variables) now resync instead of resetting the client's data (with servers supporting Sync protocol version 12).
- Mesh Sync: new
MeshConfigoptiontxLogMaxAgeSeconds()(age-based pruning of the local TX logs; default: 8 hours).
- Update Android and JVM libraries to database version
6.0.0-beta-2026-10-16 - ObjectBox Gradle plugin
- Experimental support for KSP: when the plugin detects the KSP plugin (
com.google.devtools.ksp), it will configure the new experimental KSP processor #1075 - Error when an index or a relation uses an existing UID, prevent creating duplicate UIDs for them
- Experimental support for KSP: when the plugin detects the KSP plugin (
- ObjectBox Maven plugin: release
1.4.0-beta.1, supports transforming entity classes with Java 11 byte code (class file major version 55).
- Update Android and JVM libraries to database version
6.0.0-beta-2026-10-05.- Closing a store with an open transaction created in the same thread is more robust now: the transaction gets aborted with a warning instead of entering an infinite loop state (note that this is still a programming error and should be avoided in the first place).
- ObjectBox Gradle plugin: requires at least Gradle 8.3.
- ObjectBox Gradle plugin: when using built-in Kotlin with Android Gradle Plugin 9, applies AGPs custom kapt plugin or suggests to add it, adds the ObjectBox Kotlin dependency.
- objectbox-rxjava3 and objectbox-meshsync-android: require only Kotlin compiler and standard library 2.2.0 to match objectbox-kotlin
- Admin: make keep-alive service compatible with Android 14 and newer.
- Requires a server that supports Sync protocol version 12
- Changed sync filters (e.g. changed filter variables) to resync instead of reset the client's data (V12 servers);
applyFilterVariables()reconnects to apply changed variables
- Update Android and JVM libraries to database version
6.0.0-beta-2026-07-13- Admin: modernized user interface based on Vue.js 3 and Material Design 3
- Admin: optimized pages now loading faster
- Android: log messages now use the logcat tag "ObjectBox" (previously "Box")
- Internal fixes and improvements
- objectbox-kotlin: requires at least Kotlin compiler and standard library 2.2.0
- Requires a server that supports Sync protocol version 11
- New Mesh Sync API: peer-to-peer (P2P) synchronization between sync clients without a central server.
- Attach a
MeshConfigviaSyncBuilder.mesh()and query the running mesh viaSyncClient.getMesh()(state, connected peer count, statistics counters). Mesh configurations are created by ObjectBox platform libraries that provide a mesh network (transport). - New artifact
objectbox-meshsync-android: provides the mesh network for Android using Google Nearby Connections. Add it next to the Sync variant of the Android library (likeobjectbox-sync-android) and create a mesh configuration withAndroidMeshSync.createConfig(context, meshId). It includes the permissions required by Nearby Connections and theplay-services-nearbydependency. See its README for details.
- Attach a
- Update Android and JVM libraries to database version
5.3.2-2026-05-05- Fixed a corner case with "unique replace on conflict" and absent (e.g. null) sync clock value
- Internal fixes and improvements
- Update Android and JVM libraries to database version
5.3.1-2026-03-26
- Critical fix for sync clock property handling
- Update Android and JVM libraries to database version
5.3.0-2026-03-23 - Admin: Status tab "Count and Sizes" and "System and Info" improved
- Conflict resolution via the new annotations
@SyncClockand@SyncPrecedence(allows last win with custom conflict resolution) - Fix bad Sync client state after multiple full sync messages were interrupted
- Fix adding indexes to Sync types
- Gradle plugin: to apply the plugin, it is no longer necessary to add a manual mapping of the plugin ID in your projects Gradle settings file. This was resolved by publishing Gradle plugin marker artifacts. #960
- Gradle plugin: it is no longer necessary to apply the plugin after the dependencies block when manually including ObjectBox dependencies.
- Update database libraries for Android and JVM to database version
5.2.0-next-2026-03-10 - (Minor) performance improvements of HNSW vector search on Linux ARM targets
- Sync protocol version 10
- SyncClient: support updating filter variables. After login, stage updates using put and remove, then schedule to send
them to the server with
applyFilterVariables(). - Update client sync filters variables when online
- Clients report errors to the server
If your settings.gradle.kts or settings.gradle file contains lines similar to:
pluginManagement {
repositories {
mavenCentral()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "io.objectbox") {
useModule("io.objectbox:objectbox-gradle-plugin:${requested.version}")
}
}
}
}Update them to remove the plugin mapping configuration:
pluginManagement {
repositories {
mavenCentral()
}
}If your build scripts are applying the plugin after the dependencies block similar to:
dependencies {
// ...
}
apply(plugin = "io.objectbox")Change them to apply the plugin using plugins syntax:
plugins {
id("io.objectbox")
}
dependencies {
// ...
}- The ObjectBox Gradle plugin requires JDK 11 and Android Gradle Plugin 8.1 or newer.
- Update database libraries for Android and JVM to database version
5.1.1-pre-2026-02-16. - Admin: new "Counts and Sizes" view (via Status page) to give an overview over all types their object counts and sizes
- Admin: fix reload via browser to stay on the page
- Admin: schema view to display flags as text
- Admin: refresh button for the data view
- Add simplified
Sync.client(boxStore)helper method. Move URL and credentials options to builder, add variants that accept multiple URLs and credentials. Deprecate the existing helper methods. - Add Sync client builder option to configure Sync behavior using SyncFlags.
- Add ObjectBoxThreadPoolExecutor, a
default implementation of a
ThreadPoolExecutorthat properly cleans up thread-local Box resources. - Add methods
newCachedThreadPoolExecutor()andnewFixedThreadPoolExecutor()toBoxStoreto help create instances ofObjectBoxThreadPoolExecutorfor common uses. - Add methods
newCachedThreadPoolDispatcher()andnewFixedThreadPoolDispatcher()to the Kotlin extension functions forBoxStoreto help create common coroutine dispatchers backed by anObjectBoxThreadPoolExecutor. BoxStore.runInTxandcallInTxclose a write cursor even if the runnable or callable throws. This would previously result in cursor not closed warnings when the cursor was closed by the finalizer daemon.BoxStoreno longer gets stuck while closing when deleting transactions created in other threads with open relation cursors.- Admin: the Schema view now shows if external name of types and properties if configured.
- Admin: the Schema view now shows the type as text (e.g. "String") instead of the internal type ID.
- New Sync protocol V8: using new clients also requires a server update
- Remove superfluous sync listener triggers when sync filters "report updates" (SKIP_TX)
- Sync clients compress earlier: reduces disk storage for outgoing data
- Reworked certificates for Apple platforms
- Removed support for older Sync protocol versions before 2024-09; protocol V5+ is now required.
- Update runtime libraries for Android and JVM to database version
5.0.0-2025-09-27. - 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.
- Add
filterVariablesoption toSyncClientbuilder for Sync filters introduced in version 5.0.
- Includes runtime libraries for Android and JVM with database version
5.0.0-2025-09-16.- 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 to0. objectbox-dart#740
- 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
closing
BoxStore. - 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.
- Support Sync server version 5.0.
- User-Specific Data Sync: support configuring Sync filter
variables on
SyncClient.
- User-Specific Data Sync: support configuring Sync filter
variables on
- Requires at least Kotlin compiler and standard library 1.7.
- Data Observers: closing a Query now waits on a running publisher to finish its query, preventing a VM crash. #1147
- Update database libraries for Android and JVM to version
4.3.1(include database version4.3.1-2025-08-02).
- 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.dllshipped 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).
- 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).
- Add new query conditions
equalKeyValue,greaterKeyValue,lessKeyValue,lessOrEqualKeyValue, andgreaterOrEqualKeyValuethat 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.1.1 and Gradle 8.2.1 are required.
- 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).
- Add JWT authentication
- Sync clients can now send multiple credentials for login
- 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.
- 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).
- 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).
- 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.
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).
See the Changelogs in the documentation.