Questions tagged [realm]
Realm is an object-oriented database widely used as an alternative to SQLite & ORMs that includes a built-in device-to-cloud data sync. Realm supports a variety of platforms including Android, iOS, Linux, macOS, and Windows.
9,092
questions
0
votes
0
answers
12
views
How to reset MongoDB User password in Kotlin using Realm?
Hello I am using MongoDB for my Android app I am developing with Compose and I need to add Reset Password function in my App.
mongoDB.getApp().emailPasswordAuth.resetPassword(password, tokenId, token) ...
-1
votes
0
answers
17
views
Realm Offline mode Support
I have one website which is built in Core PHP with MySQL database. I want to use a third-party like realm where I can store data locally and run the website in offline mode. Can anyone suggest to me ...
0
votes
0
answers
20
views
Realm error when adding Compose library to the project
I am trying to add Jetpack Compose but the app crashes at launch when installed over a version without Compose with the following error logs:
E/[Koin]: Instance creation error : could not create ...
0
votes
0
answers
10
views
Use BSON.Date or IsoDate in MongoDB Realm
I'm calling an endpoint with a realm function that insert into a collection. I pass a date as IsoString and would like it stored as with datetime:
Ex of how date 2018-01-01T18:25:00.000+00:00 is ...
0
votes
0
answers
17
views
hello i am using Realm in my project but when i run my project its gives me a crash
Hello i have an error when i integrate the Realm Database in my project and I am using realm version 10.11.0 but when I run my project in device its throwing me the error in this line
Realm....
0
votes
0
answers
8
views
Ream node.js does not update record. How to solve this?
I try to update a record, following the documentation here . But After I check the record it is not updated. I filter the object correctly but when I try to set hasSentEntry to a boolean it seems to ...
-2
votes
3
answers
27
views
Best way to store and persist cart data in react native? [closed]
Options:
via API in our database
RealM database to store locally
Local Storage
0
votes
0
answers
15
views
Multiple connection with MongoDB Realm
I have a question with MongoDB Realm. I’m using Realm NodeJS SDK in my Project A and exporting that to use all over the application.
const realm = new Realm({
schema: [Animal, Tasks],
});
I want ...
1
vote
0
answers
22
views
What am I doing wrong with React context?
Quick context, I am making a character-building app (think D&D Beyond). Users can log in, use the builder to generate a character, and then later recall and level-up that character. I'm hosting ...
0
votes
2
answers
26
views
Swift Realm temporary storage
I'm searching the best solution to save an object during it's modification with Realm because if you put the app in background, the object's modified values are currently lost. I would like to save it ...
0
votes
1
answer
24
views
Is there any way to avoid a Realm schema migration (i.e. just start from scratch)
I'm just learning Realm and my schema is evolving. I changed some of my objects from "Object" to "EmbeddedObject" now my iOS app is crashing during Realm migration. I'm really ...
2
votes
1
answer
51
views
How to compare int as string?
I'm using Realm in my React Native app.
There is a search bar to filter data by ID, and that ID is int in my database.
If user searches for 418, I need to return all IDs like 41878, 41835.
Here is ...
0
votes
0
answers
12
views
Realm Database Design Note app Stock on Edit note
so i have this app where in MainActivity ther is the RecyclerView for showing the Notes
and i want when click on the note to open the note and can edit it basically AddNoteActivity with Data that ...
0
votes
1
answer
37
views
MongoDB Realm with nodejs memory leak issue
We are using Realm with node.js in our product. The way we are using it is following:
const realmConfig = await Realm.open({
path: "db_name.realm",
schema: configurationList,
...
0
votes
0
answers
22
views
How to filter realm objects by date field in javascript?
Relam has a filtered method to filter the results. One of my fields is type of date and I want to filter result by that and this is my code but I got the error Error: Invalid predicate: 'createdAt >...
0
votes
0
answers
27
views
Getting crash with NoSuchMethodError in Android
I am getting a crash on a particular screen and the following error is coming up.
java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;II)V in class Lio/realm/internal/...
0
votes
1
answer
16
views
How to write and read Android Realm?
I need to cache data in Realm in Android/Kotlin project.
When I write and then read – I get nothing. Previously I could write once, so I know that reading code works. But writes do nothing. Then I ...
0
votes
0
answers
30
views
How can I install a prepopulated Realm database into a Flutter application?
I have a Flutter application that uses a pre-populated Realm database. Running flutter run -d <some-device> only install the app without the pre-populated database. How can I install the pre-...
2
votes
2
answers
32
views
Persisted String List property RealmSwift
I am trying to set an array of String to a List of String for my Realm Object, but I got and error "Generic type 'List' specialized with too few type parameters (got 1, but expected 2)".
I ...
0
votes
0
answers
25
views
When adding hilt dependency the realm database crashes
I have added hilt in a project that uses Realm database for android. After I added hilt dependencies in the gradle the app crashes and it happens while performing operation on realm database.
I am ...
0
votes
0
answers
18
views
How to properly manage Realm instances
I have a Java Hilt project, and I want to call my Realm repository from any class. The problem is Realm instances can only be accessed by the thread that created them, and I have multiple threads ...
-3
votes
1
answer
35
views
I'm building a multiplatform app with SwiftUI in xcode. I want to use realm. It works in iOS App, but it didn't work in MacOS App [closed]
error:Failed to login to Realm: The operation couldn’t be completed. Operation not permitted
0
votes
0
answers
19
views
Realm Instances are not closing
I use Realm version 7.0.0 with the Repository architecture.
When I'm running transactions, for example:
Realm.getDefaultInstance().use { defaultInstance ->
defaultInstance.executeTransaction {
...
0
votes
2
answers
45
views
Is Realm smart when updating values or check for new values should be perfomed manually?
I wonder if I should create my own additional layer when updating Realm objects to avoid redundant database writing operations or is it done automatically on a lower level?
Let's take an example:
...
0
votes
0
answers
18
views
Hii, I'm building an app and i need a way to store firebase FCM push notification data in RealmDB, how can I do this?
This is my database and the basic idea here is that a user can have multiple notifications and that notification contains title and message so we have created a Notification schema and in user_details ...
0
votes
0
answers
29
views
How to add custom object ID to realm record?
I’m trying to implement simple app that reads and writes to/from realm in my Android/Kotlin app. I have two functions:
class MainActivity : AppCompatActivity() {
private var realm: Realm? = null
...
2
votes
1
answer
21
views
SwiftUI: View doesnt update when Data added to Realm DB through Sheet
I am having a very irritating problem, with my view and Realm DB. So I have a very simple code, I have a view were I display the stored Names in my Realm DataBase. These Names are stored by navigating ...
0
votes
0
answers
18
views
How to change realm equalTo extension to list methods?
I would like to change equalTo realm method to list kotlin methods.
This is my extension of realm:
fun <E : RealmObject> RealmQuery<E>.equalTo(
property: KProperty1<E, Int?>,
...
0
votes
0
answers
23
views
MongoDB Flexible Realm Sync Rules across Collections
As I am using Flexible Sync for my application, I have to define my rules on sync level and not on document level. However I was wondering how to achieve read and write permissions across collections ...
0
votes
1
answer
34
views
How to initially set the value in realm model property by [String] and call it to display?
I study realm and want to add initial values to the database and then display them with the ability to add them, but I don't understand how to set them at the beginning. An array can only be declared ...
0
votes
0
answers
35
views
How can cell break auto layout constraints by disappearing and how to prevent it?
This is first time I have to ask for help here - usually I am able to find or figure out an answer, but I guess there has to be a first time.
I have a weird issues.
After reloading data or after ...
0
votes
1
answer
49
views
How to implement Realm in your ios app programmatically?
I have an ios app. I need to store two fields in my database realm(Title and image(or path to image). Now my data is storing in struct video but after reloading the app all changes missed. So how can ...
1
vote
0
answers
39
views
Wait for Images to Download from Firebase Storage before executing next item in sequence
Process:
Get documents from Firestore
Call a function that saves images as required
Problem:
Completion handler does not seem to wait for all the images to download to disk
It goes to the next item
...
0
votes
0
answers
21
views
React native mongodb realm Update error inside write function
I got Error on my Code That says "Error: Cannot modify managed objects outside of a write transaction" as you can see I already put it inside write function. I wonder why it suddenly shows ...
0
votes
0
answers
22
views
Data stored in realm is getting overwritten by initial values
In my KMM project I have configured Realm in my shared module. When I try to write in the realm it works fine as shown in picture below, that data is saved,
But when I try to retrieve this data back, ...
0
votes
1
answer
27
views
Filtering MongoDB query with Swift & Realm
I am trying to run an Atlas query via Realm using swift, code is as follows:
app.login(credentials: Credentials.anonymous) { results in
switch results {
case .failure(let ...
0
votes
0
answers
45
views
How do I use realm with react-native correctly?
I have a "small" problem trying to use realm in combination with my react-native app.
I just started with react native and I have installed and updated everything I need for development.
I ...
-1
votes
0
answers
22
views
How to convert $gte operator to realm
hello I am currently developing an application which should work with mongo db and realm, however there are operators like "$gte", "$exists" from mongodb that I need to pass to ...
0
votes
0
answers
19
views
Mongodb API for getting application IDs does not return any value
I'm trying to write a Realm (AppService) Function to remove user's account.
I'm using curl command to check the API calls:
curl --request <METHOD> --header "Authrorization: Bearer <TOKEN&...
0
votes
1
answer
65
views
How to listen for changes in Realm with Kotlin Flow in a Repository
I'm trying to implement the same behavior of how Flow with Room Database in which it already listens to changes. I am pretty confused about how to use the RealmInstance.toflow() in which it returns a ...
0
votes
1
answer
53
views
Query MongoDB Realm array only at first index
I need to query MongoDB Realm from synced iOS and Android app. In Swift I can write something like this:
let dictionary = realm?.objects(myReamlObject.self)
let results = dictionary?.where {
$0....
0
votes
1
answer
33
views
Flutter Realm authentication not working, RealmException : non-zero custom status code considered fatal
I'm trying by following the docs to register and then login with realm.
Unfortunatly I got an error RealmException : non-zero custom status code considered fatal when trying to do :
authProvider....
0
votes
1
answer
32
views
How to detect Realm app user has been deleted?
app.currentUser.delete deletes the Realm app user from the server side. However, it seems on other logged-in devices, and the data upload is still working with no auth error.
On other logged-in ...
0
votes
1
answer
60
views
App crashes with SIGABRT only on App Review
I have a weird problem with my app. I needed to update the metadata on App Store connect and uploaded a new build to App Store. The only thing that was changed in code is two strings with version ...
0
votes
0
answers
12
views
Realm Unit Test copyToRealmOrUpdate using PowerMockito
I want to know if we can test copyToRealmOrUpdate with executeTransaction
I'm trying to follow this example this Link
I'm getting error on the line with arrow
doNothing().`when`(RealmCore::class.java)
...
0
votes
0
answers
25
views
saving data to realm database in Android inside a foreground service
I'm using foreground service for continuous Bluetooth scanning to get data from an IoT device. Inside the foreground service after receiving the data from the IoT device I try to save it to realm ...
-1
votes
0
answers
58
views
How can I make the onMove function to be able to move items in the list for Realm objects? SwiftUI
Good afternoon. I have a structure that has List and ForEach for elements: @ObservedResults(HotelPoint.self, where: {$0.selected == true}) var hotelsIsSelected
I want to make it possible to change the ...
0
votes
1
answer
41
views
Migrating existing Realm objects with duplicate values to updated model with primary key?
We have a Realm object model that looks like this:
class RealmGroup: Object {
@Persisted var name: String?
@Persisted var groupId: Int? // this *should* have been the primary key
@...
0
votes
0
answers
21
views
Remove Realm from project
I don't need anymore Realm database in my project.
Entire project is about 750 megabytes because of realm.
How to remove Realm database from xCode project?
2
votes
1
answer
81
views
100k inserts in Realm is slow, taking 30 seconds. Shall I use ObjectBox?
I have used Realm DB in my app for the last two years. Up to now, it is working fine. Now for an upgrade to my app during app startup, I need to insert close to 100k entries to Realm DB from JSON. In ...