Questions tagged [objectbox]
ObjectBox is an object-oriented embedded database and a full alternative for SQLite, developed by Greenrobot. It supports Android and plain-Java.
291
questions
0
votes
1
answer
25
views
How to store List<UInt8List> in objectbox flutter
I want to store List of Uint8list in objectBox flutter
could you tell me how could i do this
Thank you
0
votes
0
answers
13
views
Pragma table info for ObjectBox
I am using ObjectBox for the flutter project. I want to get the pragma table info for the my Product Entity. Anyone know how to get the pragma for particular Entity?
Like in sqlite pragma table_info('...
0
votes
0
answers
14
views
Should I close store while using "runAsync" method of Flutter Objectbox (Objectbox version 1.5.0)
Should close the store when interacting whith objectbox store in other thread with its method. (Flutter version 3.0.0, Objectbox version 1.5.0)
String? readNameAndRemove(Store store, int objectId){
...
2
votes
1
answer
34
views
ObjectBox, how to drop-everything migration on conflicts?
In my case saved data can be cleaned without fear in case of model changes, there is a better way to do this ?
private val dataSource = try {
MyObjectBox.builder().androidContext(context).build()....
-1
votes
0
answers
6
views
How many Box we can put in store of ObjectBox flutter
Hii This is Vikash Kumar
I am Learning ObjectBox flutter
I have doubt
How many Box we can put in store
if I put multiple box in single store. what will effect on performance
Thank you
0
votes
0
answers
12
views
Flutter objectbox initialization
How can i initialize properly the instance of my DatabaseProvider? I'm struggling with it.
I found solutions but everyone of them initialize objectbox in the widgets, but i would use Bloc pattern in ...
0
votes
1
answer
11
views
Can the *.mdb file be open in two thread at the same time?
Android Objectbox Version 3.1.2
Flutter Objectbox Version 1.4.1
Android code does read/write operation
Flutter code only does read operation
Sometimes the android side throws this exception:
Could not ...
0
votes
1
answer
20
views
How to handle wholly owned nested object persistence with Objectbox in flutter app?
I have a general utilization question on how to set up Objectbox entities for wholly owned nested objects
My app has a central data entity 'Class1'. The 'Class1' entity includes an array of 'Class2' ...
-1
votes
2
answers
47
views
Set and get Image in objectbox
I want to set and get image from local storage, but I have no idea how to do this.
0
votes
1
answer
51
views
Is objectBox free of cost
Hello I am looking for cloud database on google I found ObjectBox
I want to know about Object box (Database)
it is free or not if not what is pricing
0
votes
0
answers
37
views
Error on assignable field in ObjectBox model based on a freezed class in Flutter
I'm trying to use ObjectBox on flutter with theese three Freezed classes:
product_otodb.dart:
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:objectbox/objectbox.dart';
...
0
votes
1
answer
49
views
Flutter how to convert List<Object> for using ObjectBox
I have a model like this code
class Folder {
int id;
String title;
Color? color;
List<Note> notes;
final user = ToOne<User>();
String? get dbNotes => json.encode(notes);
...
-1
votes
0
answers
39
views
ObjectBox: State condition failed in table:60
I have a problem with an objectbox database and the stack trace of the exception is this one. I haven't found any reference to this error, do you have any ideas?
Caused by: java.lang....
0
votes
1
answer
22
views
is it possible to have two or more ToMany relations pointing to the same object class?
I am trying to establish a relation between objects like the one below. After adding different Order objects to mainCourses and dessert, when loading the Customer object, both mainCourses and dessert ...
1
vote
0
answers
71
views
Objectbox doesn't store nullable value in one to many relation
I have this one to many relation which looks like this.
@Entity()
class Product {
@Id()
int id;
String name;
String category;
int categoryId;
WeightType weightType;
double? price;
...
1
vote
1
answer
78
views
how to add same object in objectbox's box multiple times?
I have ToMany relation which looks like this,
@Entity()
class Pdf {
@Id()
int id;
Uint8List pdfData;
final String customerName;
@Property(type: PropertyType.date)
final DateTime dateTime;
...
0
votes
0
answers
49
views
Why First parent model reference is getting set as null when adding the same child to second parent using `ObjectBox` in flutter?
I have two objects one parent model have ToOne relation and a child model with ToMany relation back to the parent. Now if I have two parents who are setting their relation to child then the first ...
0
votes
0
answers
38
views
ObjectBox Database sharing between main app and its extension
I was trying to share the Objectbox created database between the app and its extension.
I used the below code to share the database between the app and its extension.
static func storeURL() -> URL {...
1
vote
1
answer
88
views
Flutter: How to build a Photo Gallery with Photos stored in the ApplicationDocumentsDirectory?
Hi i found it quite surprising when I found not much information about this topic on stackoverflow and the internet.
I try to build a Photo Gallery similar to this:
Go Gallery Gif (source https://www....
0
votes
1
answer
17
views
I used objectbox in my android project, I deleted the "build" folder, it can't "run" success
Delete directory "build"
Run "app" failed
0
votes
0
answers
134
views
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<Channel> _channels({required String lang}) {
final queryBuilder = _channelBox()....
0
votes
1
answer
26
views
How to query for relations that are empty?
I have two classes with one-to-many relation:
@Entity()
class Lesson {
final course = ToOne<Course>();
}
@Entity()
class Course {
@Backlink('course')
final lessons = ToMany<Lesson>()...
3
votes
0
answers
781
views
Unable to build project for iOS
Just ran into this problem today using v1.30 and I'm out of ideas on what else to apply. Funny enough, I can run a debug build on an iOS device and it builds and runs correctly, but attempting to run ...
0
votes
0
answers
66
views
Multi user management with objectbox database
I have an application where a user logs in to their account and stores data according to their account. The user then logs out of their account and logs in with another account and stores other data ...
3
votes
1
answer
188
views
How to store a list of maps in ObjectBox box?
I'm trying to store a list of Maps in the ObjectBox box, but since I'm new to ObjectBox I don't understand how to store custom data types.
The data I'm trying to store (Structure looks like this)
name:...
0
votes
1
answer
51
views
ObjectBox & RecyclerView - Filter & Sort
When using LiveData for the RecyclerView with filters, the code looks usually like this:
ViewModel.kt
private val selectedCategory = MutableLiveData<Category>()
val channels: LiveData<List<...
1
vote
1
answer
138
views
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 ...
1
vote
0
answers
32
views
How do I change the primary key in ObjectBox?
The primary key existed before and now it needs to be made new.
This is how I modified it, but duplicate data will appear.
Before:
@Entity
class A {
@Id(assignable = true)
long id;
}
Now:
@...
0
votes
1
answer
297
views
How initialize Objectbox entity with custom type?
I'm working with Objectbox (1.3.0) to build my database on Flutter.
I try to create an entity composed of a custom type (enumeration) like this :
type_enum.dart
/// Type Enumeration.
enum TypeEnum { ...
0
votes
1
answer
250
views
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,
...
}
@...
0
votes
0
answers
96
views
How to use the ObjectBox Data Browser in a multi-module Android Project?
I have different modules in my android kotlin project. I follow the setup for integrating the ObjectBox Data Browser in my app. https://docs.objectbox.io/data-browser#browse-data-on-your-device
My app ...
0
votes
0
answers
35
views
How to use regular expression in ObjectBox
I want to implement regular expression in ObjectBox database. Something like -
Query<User> query = userBox.query().like(User_.firstName, "J*e?").build();
List<User> users = query....
2
votes
1
answer
85
views
Make sure value returned from coroutine overwrites default value in android kotlin
I would like to make sure queried value from database comes always later than default value.
For example
class SetTimeFragment : Fragment(){
private lateinit var binding: FragmentSetTimeBinding
...
1
vote
2
answers
72
views
How to create a many to many relation in Objectbox in fbs file
This is my database.fsb file
table Author {
/// objectbox:id
id:ulong;
text:string;
}
table Book{
/// objectbox:id
id: ulong;
name: string;
/// objectbox:relation(name=...
0
votes
0
answers
19
views
migrate android app from ormlite to objectBox
I have an existing app that already uses the Ormlite library, how to migrate to objectBox?do everybody have an example?
0
votes
0
answers
61
views
Objectbox Flutter - iOS app crashes on startup
I set up an Objectbox db for my flutter app following the instructions here - https://docs.objectbox.io/getting-started - and it worked a treat. Fast, easy, and no issues at all when deployed to to ...
1
vote
1
answer
34
views
Does ObjectBox Swift allow conflict strategies for unique entity annotations?
ObjectBox's Java api has a unique entity annotation which allows you to specify a conflict strategy
@Unique(onConflict = ConflictStrategy.REPLACE)
Does the Swift api provide similar options for its ...
0
votes
1
answer
20
views
Can an ObjectBox property have multiple annotations?
ObjectBox documents several annotations that can be applied to and entity's properties. Can one property have multiple annotations?
For example, would this be a valid entity?
@Entity
data class User(
...
0
votes
2
answers
170
views
Should I use ObjectBox in a separate isolate so as not to block UI thread?
I'm going to use ObjectBox in my Flutter project. But I noticed that the get method is synchronous. So should I use ObjectBox in a separate isolate to avoid blocking the UI thread?
0
votes
0
answers
113
views
Get cached data from objectbox without connection with Flutter 2.8 and Riverpod
I am using Riverpod and ObjectBox with Flutter 2.8 in clean architecture. Lately, I've been fixing some issues with using ObjectBox in Flutter.
I get data from an API which I convert to a model. Then ...
0
votes
1
answer
121
views
Update only selected columns in ObjectBox Android
Is it possible that update only selected columns in ObjectBox Android?
For example, there are 5 columns in "Remind" Entity
@Entity
data class Remind (
@Id var id: Long = 0,
var ...
0
votes
0
answers
78
views
Handle ObjectBox entity with relations in Jetpack Compose
So I have an Entity with some ToOne relations, and I'm trying to create a form in Jetpack Compose which will modify the values in one of the nested objects. However, the value changes does not trigger ...
0
votes
1
answer
451
views
How to define relations inside @freezed entity with objectbox dart?
By following this
I have a CurrentUser entity as follows:
import 'package:admin/core/auth/enums/content_type.dart';
import 'package:admin/core/permission/model/permission.dart';
import 'package:...
2
votes
0
answers
254
views
Can't test with coverage in Android Studio and ObjectBox bacause of "cannot find symbol" compilation errors in auto-generated files
I'm using Android studio 4.1.1, ObjectBox 3.0.1 and Kotlin 1.5.10.
The tests run nicely when I hit the run button on the test class or run ./gradlew :app-core:test, but when I click on Run X with ...
1
vote
1
answer
28
views
how BoxStoreBuilder.usePreviousCommit works internally?
i converted my android app from mapdb to objectbox, i've seen on github a few people reporting database corruption with objectbox and the solution has always been to call usePreviousCommit in case of ...
0
votes
0
answers
52
views
What is the security measure of Flutter-ObjectBox?
I would like to know what are the security features of ObjectBox in a Flutter. How secure they are.
0
votes
2
answers
294
views
Flutter: CocoaPods could not find compatible versions for pod "ObjectBox"
I'm using OjbectBox for the first time in my Flutter project. After I wrote the basic code to read and right user data, I'm getting this error:
[!] CocoaPods could not find compatible versions for pod ...
1
vote
1
answer
108
views
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()
...
2
votes
1
answer
495
views
Use ObjectBox / Instantiate store and box with Flutter 2.5 and Riverpod
I am using ObjectBox on Flutter 2.5 with Riverpod. The goal is to allow fast caching of a lot of data from an API.
If there is a difference between remote data and that in the box, then we update. The ...
0
votes
1
answer
288
views
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 ...