To upgrade to this major release run flutter pub upgrade objectbox --major-versions
(or for Dart Native apps dart pub upgrade objectbox --major-versions
).
- Breaking changes to generated code: run
flutter pub run build_runner build
(ordart run build_runner build
for Dart Native apps) after updating! - Added and updated async APIs in
Box
:- new
getAsync
,getManyAsync
,getAllAsync
, - new
putAsync
andputManyAsync
which support objects with relations, - renamed the former
putAsync
toputQueuedAwaitResult
, - new
putAndGetAsync
andputAndGetManyAsync
which return a copy of the given objects with new
IDs set. - new
removeAsync
,removeManyAsync
andremoveAllAsync
.
- new
- Add new async
Query
APIs:findAsync
,findFirstAsync
,findUniqueAsync
,findIdsAsync
and
removeAsync
. - Support sending objects containing
ToOne
andToMany
across isolates, e.g. when using
store.runInTransactionAsync
. #340 Store.attach
(andStore.fromReference
) do not longer accept a null model, which was not
supported anyhow.- Breaking change: renamed
store.awaitAsyncSubmitted
andawaitAsyncCompletion
to
awaitQueueSubmitted
andawaitQueueCompletion
to avoid any mix-up with the new async methods. - Removed deprecated
Store.runIsolated
. - Require at least Dart SDK 2.15 (shipped with Flutter 2.8.0).