130 questions
0
votes
1
answer
54
views
Is there any way to treat an old deleted property and a new property with the same name (but different UID) as the same property in database?
I had this property named reminders in my Task entity.
String? reminders;
then I deleted it to migrate it to use List<String> instead, unfortunately I realized this later that to migrate the ...
2
votes
0
answers
51
views
Objectbox sort object using the sum in one to many relations
I am using objectbox for the database in my app. I have a one to many relation between my items and I want to sort my items based on that relation.
As an example I use these entities :
@Entity()
class ...
1
vote
0
answers
78
views
ObjectBox for Dart not lazy-loading ToMany relations separately
In the documentation for ObjectBox, they say
to-many relations are resolved lazily on first access, and then cached in the source entity inside the ToMany object.
In my app, I want to use a ToMany ...
0
votes
0
answers
16
views
Querying by count of elements in a tomany relation (How many customers with at least two orders?)
I'm new to ObjectBox so this question might be very basic, but I could not find an answer in the guides.
In the sample classes below, I would like to query all Customers that have at least 2 orders.
...
0
votes
1
answer
96
views
ObjectBox select what to sync
I am just trying out ObjectBox and sync server.
I have a very simple sync scenario where I have multiple users for example user_A and user_B. Each user may have multiple devices, for example user_A ...
1
vote
0
answers
58
views
ObjectBox Admin in Docker - Not refreshing UI data when db data are CRUDed
I am using ObjectBox Admin in Windows through WSL (Docker in WSL, using objectbox-admin.sh) and accessing a db file in Documents folder (shared with WSL).
From a browser I can access the contents in ...
0
votes
1
answer
75
views
Error 404 when saving object with relation in Objectbox after removing a ToMany relation
I use objectbox with Flutter for one of my project. I have two object link MyObject and InsideObject :
@Entity()
class MyObject {
@Id()
int id = 0;
String? name;
final insideObjects = ToMany&...
0
votes
1
answer
113
views
Flutter builds fail consistently when attempting to work with Flutter databases
I'm learning Flutter and focusing on Databases but have been unable to use them.
An error occurs after adding dependencies for Isar and ObjectBox databases, however Hive appears to work.
After adding ...
0
votes
0
answers
53
views
Unable to get expected result when performing relational queries using linkMany
I want to query a list of NoteCollectionEntity which does not contain a NoteEntity having an id of value id.
For context, here's the model definition for NoteEntity:
@Entity()
@CopyWith()
class ...
0
votes
1
answer
65
views
Am having setter error in Object Box flutter for a nested relationship
The setter 'target' isn't defined for the type 'LocationModel'.
Try importing the library that defines 'target', correcting the name to the name of an existing setter, or defining a setter or field ...
0
votes
1
answer
193
views
Objectbox flutter: watch limit
My question will seem quite simple but i have hard time to find anything about limit watch in objectbox.
box.query().watch(triggerImmediately: true).map((e) => e.find());
I was able to do it like ...
3
votes
0
answers
188
views
Query using multiple links in Objectbox
I have these 2 entities in objectbox:
@Entity()
class Account {
@Id()
int id = 0;
}
@Entity()
class Transaction {
@Id()
int id = 0;
final fromAccount = ToOne<Account>();
final ...
0
votes
0
answers
47
views
Not able to assign value into objectbox model with relation in flutter
I have model class which is created using Json to dart conversion. When I use this class as objectbox model, I can't set the relation. If I set the relation then jsonTo, jsonFrom methods not working ...
0
votes
1
answer
85
views
How to loop through Flutter ListView tiles generated from an ObjectBox database?
I have a Flutter app which uses ObjectBox to store back-end data, which is a list of Product objects. I have created a ListView Tile widget to present the data called ProductTile. I generate a ...
0
votes
0
answers
114
views
Sourcery.app artifact instead of Runner.app created during iOS build
I am using ObjectBox for Dart/Flutter. As per documentation, iOS requires objectbox_flutter_libs package. However, Adding objectbox_flutter_libs (or objectbox_sync_flutter_libs) to pubspec.yaml causes ...
0
votes
4
answers
888
views
UnsupportedError (Unsupported operation: Loaded ObjectBox core dynamic library has unsupported version 0.18.1, expected ^0.19.0)
I get this exception at the startup of the app.
UnsupportedError (Unsupported operation: Loaded ObjectBox core dynamic library has unsupported version 0.18.1, expected ^0.19.0)
Flutter 3.15.0-15.2.pre ...
0
votes
1
answer
465
views
Getting Error: Bad state: failed to create store: Cannot open store: another store is still open using the same path: "/data/..." error 10001
I'm trying to store data locally with ObjectBox in Flutter, and I started getting this error. Everything looks good according to the documentation, I'm unsure why I'm getting errors from the objectbox....
0
votes
1
answer
255
views
passing parameter to object box query
I am new to object box. I am struggling on finding a way to pass parameters to my query. i looked at the documentation but still struggling.
this is my code
late Stream<List<dynamic>> ...
0
votes
0
answers
905
views
Flutter ObjectBox: Incoming index ID does not match existing UID
I'm dealing with an issue related to ObjectBox migrations. Whenever I make a name change to any property in the app, if I re-run the flutter pub run build_runner build command to re-build the ...
1
vote
0
answers
149
views
Objectbox Sync with Fly.io
I would like apply objectbox sync to fly.io. In testing in local, it is fine with the docker command. But in deploying to fly.io, I have no opinion with how to work -model command in fly.io.
docker ...
0
votes
1
answer
60
views
Does it matter which side of an ObjectBox Many to Many relationship the @Backlink annotation goes on?
The ObjectBox docs and my own empirical research have shown the @Backlink annotation should always be placed on the ToMany side of a One to Many relationship, but it is unclear to me if it matters ...
1
vote
1
answer
324
views
In ObjectBox for Flutter, is there a way to compare two properties?
I'm new to using ObjectBox, so I've been trying to do some experimenting with its query system to familarize myself with it. One of the queries I've been unable to do is a query comparing two ...
0
votes
1
answer
467
views
Flutter ObjectBox: Is List<String> supported for property converters?
The Flutter ObjectBox docs state:
ObjectBox (Java, Dart) has built-in support for String lists. ObjectBox for Java also has built-in support for String arrays.
However, using a List<String> in ...
0
votes
1
answer
145
views
Is there an objectbox condition, that can filter by string length?
Can I make a database query, with a condition that filters out any elements when a text field doesn't have length 2 or 3 characters?
1
vote
1
answer
1k
views
Streaming data from local ObjectBox (or Hive) database in a Clean Architecture Style
Maybe someone else has the same issues as I had, so here is how I implemented it, finally. I am showing this for ObjectBox, but some of the methods work for Hive or other databases as well.
My issues ...