Skip to content

Releases: objectbox/objectbox-java

V4.1.0

30 Jan 20:30
Compare
Choose a tag to compare
  • Vector Search: add new VectorDistanceType.GEO distance 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

21 Oct 13:01
Compare
Choose a tag to compare
  • 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 null map 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

20 Aug 12:00
Compare
Choose a tag to compare
  • Add convenience oneOf and notOneOf conditions that accept Date to avoid manual conversion using getTime().
  • When BoxStore is closing, briefly wait on active transactions to finish.
  • Guard against crashes when BoxStore was closed, but database operations do still occur concurrently (transactions are still active).

V4.0.1

03 Jun 14:05
Compare
Choose a tag to compare

V4.0.0 - Vector Search

16 May 07:24
Compare
Choose a tag to compare

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 old setParameters(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

13 Feb 14:15
Compare
Choose a tag to compare
  • Support creating file-less in-memory databases, e.g. for caching and testing. To create one use inMemory() when building a BoxStore:
    store = MyObjectBox.builder()
            .androidContext(context)
            .inMemory("test-db")
            .build();
    See the 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 existing maxSizeInKByte() 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-stdlib 1.8 from objectbox-kotlin as 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.

V3.7.1

08 Nov 10:43
Compare
Choose a tag to compare
  • Throw an exception instead of crashing when trying to create a query on a closed store. #1154
  • The Gradle plugin now requires at least Gradle 7.0 and Android Gradle Plugin 4.1.
  • The Android library now requires Android 4.4 (API 19) or newer.

V3.7.0

23 Aug 09:31
Compare
Choose a tag to compare
  • A new key/value validation option validateOnOpenKv() is available on MyObjectBox.builder() to help diagnose FileCorruptException: Corrupt DB, min key size violated issues. If enabled, the build() call will throw a FileCorruptException if corruption is detected with details on which key/value is affected. #1143
  • Admin: integer and floating point arrays introduced with the previous release are now nicely displayed and collapsed if long.
  • Admin: the data table again displays all items of a page. #1135
  • The __cxa_pure_virtual crash should not occur anymore; if you get related exceptions, they should contain additional information to better diagnose this issue. Let us know details in #1131
  • Queries: all expected results are now returned when using a less-than or less-or-equal condition for a String property with index type VALUE. Reported via objectbox-dart#318
  • Queries: when combining multiple conditions with OR and adding a condition on a related entity ("link condition") the combined conditions are now properly applied. Reported via objectbox-dart#546
  • Some flags classes have moved to the new config package:
    • io.objectbox.DebugFlags is deprecated, use io.objectbox.config.DebugFlags instead.
    • io.objectbox.model.ValidateOnOpenMode is deprecated, use io.objectbox.config.ValidateOnOpenModePages instead.

V3.6.0

16 May 11:59
Compare
Choose a tag to compare
  • Support for integer and floating point arrays: store

    • short[], char[], int[], long[] and
    • float[] and double[]

    (or their Kotlin counterparts, e.g. FloatArray) without a converter.

    A simple example is a shape entity that stores a palette of RGB colors:

    @Entity
    public class Shape {
    
        @Id public long id;
    
        // An array of RGB color values that are used by this shape.
        public int[] palette;
    
    }
    
    // Find all shapes that use red in their palette
    try (Query<Shape> query = store.boxFor(Shape.class)
            .query(Shape_.palette.equal(0xFF0000))
            .build()) {
            query.findIds();
    }

    This can also be useful to store vector embeddings produced by machine learning, e.g.:

    @Entity
    public class ImageEmbedding {
    
        @Id public long id;
    
        // Link to the actual image, e.g. on Cloud storage
        public String url;
    
        // The coordinates computed for this image (vector embedding)
        public float[] coordinates;
    
    }
  • Fix incorrect Cursor code getting generated when using @Convert to convert to a String array.

  • The io.objectbox.sync plugin now also automatically adds a Sync-enabled JNI library on macOS and Windows (previously on Linux x64 only; still need to add manually for Linux on ARM).

We're hiring! 😎 We believe resource-efficient coding is still cool and are looking for a C / C++ developer who shares our sentiment.

V3.5.1

21 Mar 07:17
Compare
Choose a tag to compare
  • Fixes writes failing with "error code -30786", which may occur in some corner cases on some devices. #1099
  • Add docs to DbSchemaException on how to resolve its typical causes.

We're hiring! 😎 We believe resource-efficient coding is still cool and are looking for a C / C++ developer who shares our sentiment.