Questions tagged [flutter-objectbox]

ObjectBox is a super-fast database storing Dart objects locally.

ObjectBox is a super-fast database storing Dart objects locally.

High performance - improving response rates and enabling real-time applications.

ACID compliance - Atomic, Consistent, Isolated, Durable.

Relations - object links / relationships are built-in.

Scalable - grows with your app, handling millions of objects with ease.

Queries - filter data as needed, even across relations.

Statically typed - compile-time checks & optimizations.

Multiplatform - Android, iOS, macOS, Linux, Windows.

Schema migration - change your model with confidence.

ObjectBox Sync - keeps data in sync offline or online, between devices and servers.

Links:

112 questions
1
vote
0 answers

Dart ObjectBox nested query not working as expected

I have the ObjectBox database and it is working pretty well. But nested queries not working as expected List _channels({required String lang}) { final queryBuilder = _channelBox().query(); queryBuilder.linkMany( …
1
vote
1 answer

objectbox flutter select specific property or get all object which have unique property value

I have an object entity in which i store many fields including clientNumber and clientName . I know that i can use property query on the clientNumber field but i wouldn't get the clientName, i also know that in objectbox for java there is a filter…
1
vote
1 answer

How store list of enumeration data in Flutter/Datrt ObjectBox?

I use ObjectBox (3.0.0) on flutter/dart to implement the database part. In an Entity, I am looking to add an enumeration type list. enum ExampleEnum { exampleOne, exampleTwo, ... } @Entity() class Examples { /// ObjectBox 64-bit…
Dev Loots
  • 708
  • 9
  • 28
1
vote
1 answer

Is it possible to query by backlink relation?

I have 2 classes set up with these relations, with Faults only having 1 equipment, and equipment having many faults. @Entity() class Equipment { int? id; String adminNumber; ... @Backlink() final faults =…
Swisscheese
  • 571
  • 1
  • 5
  • 21
1
vote
1 answer

Dart ObjectBox - Delete all Files created by ObjectBox

I try to figure out how to delete all created files from ObjectBox. During my unittest ObjectBox creates the needed files in the directory that I'm giving it on my local machine. After the unittest I want that ObjectBox deletes all the created…
F.M.
  • 630
  • 1
  • 5
  • 18
1
vote
1 answer

How can I have multiple boxes of the same type?

I want to store the same type of information in different boxes. Example : One box would contain the tweets I liked, and another the tweets I retweeted.
ouai
  • 150
  • 1
  • 10
1
vote
1 answer

Objectbox Sync Server Configuration Troubleshooting

Follow guide from https://sync.objectbox.io/objectbox-sync-server I already has my downloaded Objectbox sync server files Download My Objectbox sync-server file (i got it from Objectbox Team) that and extract it Copy my objectbox-model.json…
Jacob Handaya
  • 189
  • 1
  • 9
1
vote
1 answer

Applying changes of ToMany relation to objectbox store in dart

In project i use latest Dart version with objectbox: ^1.0.0: @Entity class Node{ ... @Transient() final List _edges = List.empty(growable: true); final relEdges = ToMany(); ... } @Entity class Edge{ ... …
1
vote
1 answer

is it possible/worth to deeply nest data in ObjectBox?

The ObjectBox documentation describes creating 1:1 and 1:n relations. But is it possible and feasible to create a 1:n:m relation? So I would have a domain data model like class ClassA { List myClassB; } class ClassB { List
w461
  • 2,168
  • 4
  • 14
  • 40
1
vote
1 answer

How to do Unit testing in Object Box for flutter project?

How can we do unit testing for object box in flutter project for all crud operations? class ShapeRepo { final _box = store.box(); void saveShape(ShapeModel model) { _box.put(model); } This is one example. There are many box…
raphire
  • 198
  • 9
1
vote
1 answer

Objectbox Saved relation's target is null for ToOne and ToMany

Recently updated from 1.0.0 to 1.1.1 and my relation code quit working, I'm unsure what I missed exactly but everything up until the querying of the item seems to work correctly. This is what I have, and I could really use some help figuring out…
Swisscheese
  • 571
  • 1
  • 5
  • 21
1
vote
1 answer

ObjectBox Generator: Error: No named parameter with the name 'lazy'

I registered my ObjectBox Store as a LazySingleton with this method setupLocatorAdditions() async { stackedAdditionLocator.registerLazySingletonAsync(() => openStore()); } Which worked fine. But after multiple rebuilds from the BuildRunner…
DJ2695
  • 62
  • 2
  • 6
1
vote
1 answer

How to migrate data and scheme from objectBox pre-populated database?

I use ObjectBox as a database manager on a Flutter/Dart Application. I use a pre-filled database (.mdb) which I copy to the application directory at the installation. How to process to a migrate the database? What type of architecture should I set…
1
vote
1 answer

What's the best practice to close the Store instance in a Flutter app?

I am building a Flutter app with ObjectBox database. App calls openStore(); at launch, and saves the Store instance in a singleton class so that I can access to it from anywhere. But I'm not sure when to call store.close(); In iOS we can execute…
Vincent Gigandet
  • 918
  • 10
  • 21
1
vote
2 answers

ObjectBox Flutter: Clear all the tables on logout

I am using ObjectBox for the database and I have created a couple of tables. Now I need to clear all the tables (like truncate to start primary id from 1 again) like Clean the Database. I didn't found any method or way to clear the database. I…
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437