Skip to content

Releases: objectbox/objectbox-dart

v1.4.1

01 Mar 14:35

Choose a tag to compare

  • Resolve "another store is still open" issue after Flutter hot restart (hot reload continues to work). #387
  • Add Store.isClosed(). #390
  • Add note to objectbox.g.dart on how to re-generate (update) it.

v1.4.0

22 Feb 13:04

Choose a tag to compare

Note: the code generated by ObjectBox has breaking changes, make sure to re-generate it after upgrading using
flutter pub run build_runner build (or dart run build_runner build for Dart only projects).

  • Support ObjectBox Admin for Android apps to browse the database. #148
  • Add Store.runIsolated to run database operations (asynchronous) in the background (requires Flutter 2.8.0/Dart 2.15.0 or newer). It spawns an isolate, runs the given callback in that isolate with its own Store and returns the result of the callback. This is similar to Flutters compute, but with the callback having access to a Store. #384
  • Add Store.attach to attach to a Store opened in a directory. This is an improved replacement for Store.fromReference to share a Store across isolates. It is no longer required to pass a Store reference and the underlying Store remains open until the last instance is closed. #376
  • Add an option to change code-generator's output_dir in pubspec.yaml. #341
  • Update: objectbox-c 0.15.2.
  • Update: objectbox-android 3.1.2.
  • Update: objectbox-swift 1.7.0.

v1.3.0

22 Nov 12:50

Choose a tag to compare

  • Support annotating a single property with @Unique(onConflict: ConflictStrategy.replace) to
    replace an existing object if a conflict occurs when doing a put. #297

v1.2.1

09 Nov 13:58

Choose a tag to compare

  • Fix Flutter apps crashing on iOS 15 simulator. #313
  • Fix ToMany.applyToDb() not working after putting object with empty ToMany.
  • Update objectbox-android to 3.0.1.

v1.2.0

31 Aug 13:25

Choose a tag to compare

  • Add Query.findUnique() to find a single object matching the query.
  • Add support for relations when using 3rd-party JSON serialization libraries.
  • Fix generator when mixing backlinks and "standard" relations in the same entity (generated code had a syntax error).
  • Fix @Backlink() annotation when specifying a ToOne relation by field name.
  • Fix Query.find*() exception forwarding when a user-provided property converter throws.
  • Increase supported analyzer dependency version to include v2.x major version.
  • Update FlatBuffer dependency to the latest upstream version.

v1.1.1

09 Jul 11:19

Choose a tag to compare

  • Add support for Query.param() on linked entities.
  • Fix generated openStore() for apps that don't enable null-safety yet.

v1.1.0

06 Jul 12:29

Choose a tag to compare

  • New openStore() in the generated code to simplify creating a store instance, especially on Flutter (uses application
    documents directory as a default).
  • Add support for Entities used together with some custom code-generators (immutable objects, JSON, ...).
    See @Entity(realClass: ) new field and its docs.
  • New Query.param() to support reusable queries (changing condition values before execution).
    See Reusing queries in docs.
  • Rename semi-internal QueryRelationProperty to QueryRelationToOne and QueryRelationMany to QueryRelationToMany
    to help users pick the right link function: link() vs linkMany().
  • Add support for the entity/property/relation rename or reset workflow.
    See Data model updates for details.
  • Add support for ToOne relation cycles.
  • Enforce you can only open the same database directory once (multiple parallel Store instances are not allowed).
  • Fix macOS sandbox database directory permissions (see notes in Flutter-specific "Getting Started" docs).
  • Fix ToMany showing duplicate items after adding them before reading the previous list.
  • Fix invalid native free during store shutdown if large data was inserted (more than 64 kilobytes flatbuffer).
  • FlatBuffers serialization performance improvements.
  • Update to objectbox-android v2.9.2-RC3.

v1.0.0

18 May 11:02

Choose a tag to compare

  • New Box putAsync() returning a Future and putQueued() for asynchronous writes.
  • Query now supports auto-closing. You can still call close() manually if you want to free native resources sooner
    than they would be by Dart's garbage collector, but it's not mandatory anymore.
  • Change the "meta-model" fields to provide completely type-safe query building.
    Conditions you specify are now checked at compile time to match the queried entity.
  • Make property queries fully typed, PropertyQuery.find() now returns the appropriate List<...> type without casts.
  • Query conditions inside() renamed to oneOf(), notIn() and notInList() renamed to notOneOf().
  • Query stream and findStream() are replaced by QueryBuilder.watch(), i.e. box.query(...).watch().
  • New Query stream() to stream objects all the while the query is executed in the background.
  • New Query condition between() for integers and IDs.
  • Store subscribe<EntityType>() renamed to watch().
  • Store subscribeAll() replaced by a shared broadcast stream entityChanges.
  • Entities can now contain final fields and they're properly stored/loaded (must be constructor params).
  • Flutter desktop - native library is now downloaded automatically, same as for mobile platforms.
  • Follow exception-vs-error throwing conventions - throwing errors when it's a permanent developer-caused error. Namely,
    there's a new UniqueViolationException thrown when an object you're trying to put() would violate a Unique() index.
  • Even higher than usual amount of internal optimizations and improvements.
  • Update to objectbox-c v0.14.0.
  • Update to objectbox-swift v1.6.0.
  • Update to objectbox-android v2.9.2-RC.

v0.15.0

14 May 10:33

Choose a tag to compare

This is a 1.0 release candidate - please try it out and give us any last-minute feedback, especially on new and changed APIs.

  • New Box putAsync() returning a Future and putQueued() for asynchronous writes.
  • Query now supports auto-closing. You can still call close() manually if you want to free native resources sooner
    than they would be by Dart's garbage collector, but it's not mandatory anymore.
  • Change the "meta-model" fields to provide completely type-safe query building.
    Conditions you specify are now checked at compile time to match the queried entity.
  • Make property queries fully typed, PropertyQuery.find() now returns the appropriate List<...> type without casts.
  • Query conditions inside() renamed to oneOf(), notIn() and notInList() renamed to notOneOf().
  • Query stream and findStream() are replaced by QueryBuilder.watch(), i.e. box.query(...).watch().
  • New Query stream() to stream objects all the while the query is executed in the background.
  • Store subscribe<EntityType>() renamed to watch().
  • Store subscribeAll() replaced by a shared broadcast stream entityChanges.
  • Entities can now contain final fields and they're properly stored/loaded (must be constructor params).
  • Flutter desktop - native library is now downloaded automatically, same as for mobile platforms.
  • Follow exception-vs-error throwing conventions - throwing errors when it's a permanent developer-caused error. Namely,
    there's a new UniqueViolationException thrown when an object you're trying to put() would violate a Unique() index.
  • Even higher than usual amount of internal optimizations and improvements.
  • Update to objectbox-c v0.14.0.
  • Update to objectbox-swift v1.6.0.
  • Update to objectbox-android v2.9.2-RC.

v0.14.0

01 Apr 07:15

Choose a tag to compare

  • Fix non-nullable DateTime fields deserialization regression (introduced in v0.13.0) - fields were read as nanosecond instead of millisecond timestamp.
  • Respect case-sensitivity setting in string PropertyQuery.count() with distinct = true (the result was always like with caseSensitive = true).
  • Query findFirst() doesn't change Query object's offset and limit anymore.
  • Change Query string conditions caseSensitive default to true, previously conditions were case-insensitive by default.
  • Introduce Store constructor argument queriesCaseSensitiveDefault - allows changing the default value of caseSensitive in queries.
    This includes string PropertyQuery when using distinct = true.
  • Get around Flutter's Android release build issue by changing the code the compiler had trouble with.
  • Remove deprecated APIs from internal plugin interfaces (deprecation notice printed during Flutter build).
  • Generator - update dependencies to their null-safe versions.
  • Generated code - avoid more linter issues.