ToOne
instead of ToOne<Entity>
).AndroidObjectBrowser
, use Admin
instead. AndroidObjectBrowser
will be removed in a future release.localhost:8090
and localhost:8091
).3.0.0
, it is now possible to add a property using Object
in Java or Any?
in Kotlin. These "flex properties" allow to store values of various types like integers, floating point values, strings and byte arrays. Or lists and maps (using string keys) of those.containsElement
query condition now matches keys of string map properties. It also matches string or integer elements of a Flex list.containsKeyValue
query condition to match key/value combinations of string map and Flex map properties containing strings and integers. Also added matching Query.setParameters
overload.SuppressFBWarnings
annotation. #1011BoxStore.awaitCallInTx
suspend function which wraps BoxStore.callInTx
.application
plugin.StringOrder
for which one to choose (typically StringOrder.CASE_INSENSITIVE
).@Unique(onConflict = ConflictStrategy.REPLACE)
to replace an existing Object if a conflict occurs when doing a put. #509@Unsigned
to indicate that values of an integer property (e.g. Integer
and Long
in Java) should be treated as unsigned when doing queries or creating indexes.@Type
annotation:Flow
extension functions for BoxStore
and Query
. #900NaN
value. #984String[]
and Kotlin Array<String>
) and lists (Java List<String>
and Kotlin MutableList<String>
). Using the new containsElement("item")
condition, it is also possible to query for entities where "item" is equal to one of the elements.Map<String, String>
or Kotlin MutableMap<String, String>
). Stored internally as a byte array using FlexBuffers.@Unique(onConflict = ConflictStrategy.REPLACE)
to replace an existing Object if a conflict occurs when doing a put. #509@Unsigned
to indicate that values of an integer property (e.g. Integer
and Long
in Java) should be treated as unsigned when doing queries or creating indexes. See the Javadoc of the annotation for more details.Long
property with @Type(DatabaseType.DateNano)
.String[]
and Kotlin Array<String>
). Using the new containsElement("item")
condition, it is also possible to query for entities where "item" is equal to one of the array items.Map<String, String>
or Kotlin MutableMap<String, String>
). Stored internally as a byte array using FlexBuffers.build.gradle
files accordingly:find(offset, limit)
of Query
is more concrete on how offset and limit work.objectbox-android:2.9.0:sync
is replaced with objectbox-sync-android:2.9.1
.lessOrEqual
and greaterOrEqual
conditions for long, String, double and byte[] properties.implementation "io.objectbox:objectbox-linux-armv7:$objectboxVersion
or implementation "io.objectbox:objectbox-linux-arm64:$objectboxVersion
to your dependencies. Otherwise the setup is identical with Java Desktop Apps.Query.findLazy()
and Query.findLazyCached()
work with LazyList
#906).DbExceptionListener
by accepting null values for BoxStore.setDbExceptionListener(listener)
.BoxStoreBuilder.build()
to allow retries. For example, after a FileCorruptException
you could try to open the database again using the recently added usePreviousCommit()
option.PagesCorruptException
as a special case of FileCorruptException
.DbExceptionListener
is called more robustly.BoxStore
and BoxStoreBuilder
Box
via contains(id)
.@DefaultValue("")
annotation for properties to return an empty string instead of null. This is useful if a not-null property is added to an entity, but there are existing entities in the database that will return null for the new property. GH#157objectbox-rxjava3
. Also includes Kotlin extension functions to more easily obtain Rx types, e.g. use query.observable()
to get an Observable
. GH#83objectbox-java
no longer exposes the greenrobot-essentials and FlatBuffers dependencies to consuming projects.and()
or or()
. GH#834String[]
and Kotlin's Array<String>
are now a supported database type. A converter is no longer necessary to store these types. Using the arrayProperty.equal("item")
condition, it is possible to query for entities where "item" is equal to one of the array items.@Unsigned
to indicate that values of an integer property (e.g. Integer
and Long
in Java) should be treated as unsigned when doing queries or creating indexes. See the Javadoc of the annotation for more details.objectbox-rxjava3
. In addition objectbox-kotlin
adds extension functions to more easily obtain Rx types, e.g. use query.observable()
to get an Observable
. GH#839objectbox-gradle-plugin
to 3.0.0-alpha2
. The plugin now properly adds the preview version of objectbox-java
to your dependencies.objectbox-android
, objectbox-linux
, objectbox-macos
and objectbox-windows
artifacts shipping native code remain at version 2.5.1 as there have been no changes. If you explicitly include them, make sure to specify their version as 2.5.1
.objectbox-gradle-plugin
to 3.0.0-alpha1
and add a dependency on objectbox-java
version 3.0.0-alpha1
.objectbox-android
, objectbox-linux
, objectbox-macos
and objectbox-windows
artifacts shipping native code remain at version 2.5.1 as there have been no changes. However, if your project explicitly depends on them they will pull in version 2.5.1 of objectbox-java
. Make sure to add an explicit dependency on of objectbox-java
version 3.0.0-alpha1
as mentioned above.objectbox.incremental
to true
in build.gradle
:getRelationEntities
, getRelationBacklinkEntities
,getRelationIds
and getRelationBacklinkIds
to directly access relations without going through ToMany.putBatched
to put entities using a separate transaction for each batch.Box.removeByKeys()
is now deprecated; use removeByIds()
instead.objectbox-kotlin
to dependencies if kotlin-android
plugin is applied (previously only for kotlin
plugin) String
properties are typically taking more space than scalar values, ObjectBox switched the default index type to hash for strings.String
property by specifying the index type
using @Index(type = IndexType.VALUE)
.