Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [realm]

The Realm Platform is a data synchronization platform for mobile applications. It includes the Realm Database, the Realm Object Server, and Realm Studio. It can save you thousands of lines of code and weeks of work, and lets you craft amazing new user experiences.

0
votes
0answers
4 views

TableView doesn't show my Data from Realm

i have one problem: my tableView doesn't show any data from realm database. But i guess the problem is in cell. class ClientViewController: UITableViewController { @IBOutlet var table: ...
1
vote
1answer
16 views

Different types of DataTypes in Realm(Android Application) DataBase?

Which datatype are use in realm database(i.e. String,int etc.)? What is the size of that DataType? (i.e. in mySQL varchar max length is 65,535.)
1
vote
1answer
37 views

Android Kotlin/Anko - notifyDataSetChanged() doesn't refresh

notifyDataSetChanged() , I'm using in the UI activity... It "refreshes" the view if I open and close it... reading it from RealmDB what am I doing wrong? thanks in advance Francesco class ...
0
votes
1answer
24 views

Generic class to hold different type of data using GSON and retrofit

I am trying to make generialize class to get response from the webservice using Retrofit & Gson libary Generic class to store data public class TResponse<T> { @Expose private ...
-1
votes
1answer
39 views

How can I use a lazy var in Swift and Realm?

I have a lazy var in Swift like: import Realm class DataUser: RLMObject { @objc dynamic lazy var id: String = self.myId() @objc dynamic var firstTime: Int = 0 @objc dynamic var position: Int = 0 ...
0
votes
0answers
16 views

RealmSwift with Alamofire5

I try to use RealmSwift with alamofire5 and Codable. I followed this guide to write a network layer. Actually it works perfect, no problem until try to configure Realm. I checked this question and ...
-1
votes
1answer
31 views

Use loops to count number of records per day in Java

Bit of a noob question, but what's the best way to build a loop for this situation? Suppose I have this table. I want to count how many records are created per day and store each distinct date and ...
0
votes
0answers
5 views

How to know if Realm Results changed without wanting to know the changes?

We're investigating performance with larger Realm databases. Currently we have a few notification change listeners on a table that can have a lot of entries. Every time I make a change to an object ...
0
votes
1answer
16 views

Adding a RealmChangeListener to object created with copyToRealmOrUpdate

I have a messaging application which uses RealmDB to store messages and threads for users. The message threads are RealmObjects. I'm trying to figure out how to add a RealmChangeListener which will ...
1
vote
1answer
15 views

How to get just one location with fused location client?

What I want is to get just one fresh location and remove location updates after getting first location update and add it to realm but the problem am facing is getting more than 100 locations sometimes ...
0
votes
0answers
17 views

'can not resolve symbol io' in the realm-library\build.gradle

as the title, the io can not resolved when i import the realm examples in the android studio,can anyone help me? android.registerTransform(new io.realm.transformer.RealmTransformer(project)) ...
0
votes
1answer
26 views

How do I count the number of entries per date in a Realm database?

I have a bit of an issue. I have a realm database where each entry has an ID and a DateCreated. I'm going to display these in a chart, which can filter between ranges such as Last Week, Last Month, ...
0
votes
0answers
16 views

Duplicate remove distinct does not work on Android Realm

Hello, I want to get nal is 2018-03-23 and inout is I Data. in picture, result size is 7. but I want when I get the result size, after duplicate remove the cardnum. finally, reuslt size must be 2. ...
0
votes
0answers
8 views

Strange Realm behavior with unit tests

I'm testing registering and logging in for my Realm model. XCTAssertEqual(realm.objects(YpbUser.self).count, 1) guard let user = realm.objects(YpbUser.self).first else { ...
0
votes
1answer
11 views

What is the correct way to use RLMResults in Swift?

I had an xcode project and I was using Swift and Objective c code. Now in other Swift project I want use a function to load and manage some data from realm databases like: @objc func myData(_ allData:...
2
votes
0answers
24 views

javax.ws.rs.ProcessingException: could not find writer for content-type application/x-www-form-urlencoded type: javax.ws.rs.core.Form$1

I'm creating groups using realm in keycloak so while calling Group resource method this error occured. Stacktrace : javax.ws.rs.ProcessingException: RESTEASY003215: could not find writer for ...
0
votes
1answer
18 views

Realm.init before or after migration

I have a realm migration below that I run after the Realm.init. This seems to run okay. But when I get to the first function that uses realm I get the following error: java.lang....
0
votes
1answer
39 views

Throwing OutOfMemoryError using Jackson ObjectMapper

I'm trying to get a JSON format string from ObjectMapper inside a AsyncTask thread and I keep getting OutOfMemoryError And in the manifest file already have add the line Manifest file: android:...
1
vote
1answer
28 views

Realm() initialization returns nil

class Ticket: Object { @objc dynamic var ticketId = "" @objc dynamic var ticketTypeCode = "" @objc dynamic var price = "" required init() { super.init() } ...
0
votes
0answers
21 views

Realm & LiveData - Transformations.map not posting List to MutableLiveData

I need to load sorted data from Realm database. I have tried to load data directly and post value to MutableLiveData: mTracks.postValue(mRepository.getAllSorted(sortingDirection, sortedBy)); This is ...
0
votes
0answers
16 views

What is the application size impact of using Realm DB in Swift on iOS

I recently came across Realm DB for Swift iOS, and it looks very promising. With this said, after importing the library, the app looks like it's taking about 48 MB of storage on the device, despite ...
0
votes
0answers
10 views

Store an array of SyncUsers as a property of a Realm Object?

In my Realm app, I have my users (YpbUser) and if someone registers using one service (email, Google, FB, etc) and then tries to log in using a different service, I want to be able to see if there's a ...
0
votes
0answers
8 views

Generic Realm repository class

I've created a generic class called RealmRepo, which receives a type that extends from Object, so it can be manipulated by Realm. Its usage is pretty simple: Let's say there's an User class ...
0
votes
0answers
13 views

Redux + Rest API + Realm JS in React Native

I am developing an app that controls IOT devices via REST API. I am using Realm database inside the app to keep historical data captured by IOT sensors. I also decided to use it to persist information ...
1
vote
0answers
27 views

Is there a good way to cancel/rollback an async realm transaction mid way through its logic?

I have been going over the realm documentation and found no feasible way of cancelling an asynchronous transaction from within the transaction "body" i.e. Realm.Transaction.execute() So the only ...
0
votes
0answers
27 views

Best approach for syncing / caching content in mobile app with backend

We about to build a mobile app which displays static content made up of text, images and videos. For what it’s worth, it’s a social enterprise in the field of mental health. We want the content ...
-1
votes
0answers
6 views

The servers certificate could not be trusted while connecting with Realm Studio

When i am trying to connect the ROS using Realm Studio its says "The servers certificate could not be trusted" Below is the screen-print : enter image description here
0
votes
0answers
22 views

Realm android not generating mediator

I'm trying to make a library for android that can interact with a realm database which is present into the asset/ folder of the app. This is the exception at runtime: io.realm.exceptions....
0
votes
0answers
17 views

Do i have to assign Primary Key for each table in ORM? [duplicate]

I want to design database that have 3 tables. 1st table ___> UUID, username, password 2nd table ___> fname, lname, gender, birthdate 3rd table ___> bloood glucose value, date_time In first table, ...
0
votes
0answers
32 views

app crashing and getting error: Object has been deleted or invalidated

I'm trying to delete all objects of type "Lead", using realm, I tried using this code: RLMResults<Lead *> *allLeads = [Lead allObjects]; for (RLMObject *object in allLeads) { ...
0
votes
3answers
63 views

How to change switch conditions using Toggle button?

I have a program which creates a list of to-dos that allows the user to set a date/time for the app to notify them about it. There's a checkbox that says 'Notify me' which is supposed to schedule the ...
1
vote
1answer
40 views

Proper way to save a DateInterval to Realm

Realm doesn't support DateInterval to be store into the database. For now our team do the following: private let _intervalBegins = List<Date>() private let _intervalEnds = List<Date>() ...
2
votes
0answers
14 views

RLMSupport.swift compile error under Swift 4.0 and Xcode 9.4

I want to Use Realm-objective-c with RLMSupport.swift under swift 4.1, But this code fragment: for model in banners { // do some stuff } banners is a RLMArray of instances of BannerModel, which ...
0
votes
1answer
36 views

Realm changing values from edittext

I have the following problem: For my current Android app project I'm using Realm as a database and im trying to update a string value every time my a certain textfield changes with the value thats ...
1
vote
0answers
22 views

Movement animation with RealmRecyclerViewAdapter with Drag&Drop

I have a RealmRecyclerViewAdapter that listens to a query in realm, and I've Implemented a drag and drop functionality on it using the ItemTouchHelper. private final ItemTouchHelper.Callback ...
0
votes
1answer
49 views

Realm with Autoupdate, copyFromRealm, RxJava All together

I'm using Realm's rxjava binding toFlowable to be notified when items are updated. I have to do this in the UI Thread to get update notification from realm. on the other hand I need to make the ...
1
vote
1answer
16 views

Realm model has no initializers

I'm using a custom base class for my models to be used with Realm for Swift. This is the class. import RealmSwift public class ModelBase: Object { @objc public var createdAt, updatedAt: Date ...
2
votes
1answer
37 views

Realm for Java/Android - preserving the state of query/result

In the project currently under development, we are integrating the Realm Database into the customer's app to improve responsiveness while working on a huge data set of ~20.000 records. For on-screen ...
1
vote
1answer
13 views

Update Nested object Value on Realm iOS

Below is the data that I have fetched from server and save to realm DB, When I try to updating scheduler_data values and stop values, but they doesn't update ( { "form_id" = 3703; id = 180; ...
1
vote
0answers
37 views

Cannot read property 'token_data' of undefined

I`m trying to get Realm working with a very basic React Native setup, mostly copying code from docs. Strangely, I have problem syncing with realms with a new regular user. On admin everything works ...
0
votes
1answer
61 views

Realm Platform: How do I force sync before app goes into background?

I need to keep track of devices that are actively running the app. Right now I have a status field that changes to 1 when the app is first launched or when the device becomes active. When the user ...
0
votes
1answer
15 views

How to cleanup after deleting a Realm Object in iOS Swift

I would like to store files with Realm. My intention is to store the file on disk and save the name of the file in a Realm Object. When the object is deleted for any reason I would also like to delete ...
0
votes
1answer
8 views

Matching separated arrays for Realm Object

I’m stuck with some problem. I have a JSON response from server: { "days" : [ { "id" : 1, "name" : "Day 1 - first day", "url": "http://example.com/days/1" }, { "...
1
vote
1answer
50 views

RealmSwift and Codable when using optional types

I've been using RealmSwift and Codable for a long time in a project, however, my api dev just gave me two new properties that only exist on some return calls of an object. If I call getUserInfo, I ...
0
votes
1answer
19 views

'RLMException', reason: 'Realm accessed from incorrect thread.'

i need to write my person model to realm db. i never understod what means because i'm using one instance of realm and i think i'm using the same thread.am i wrong ?? func updatePerson(ps:personTmp){...
0
votes
0answers
27 views

addChangeListener not working Realm Android Kotlin [duplicate]

I am using Realm DB in my android app. Data is being saved/updated successfully but the problem is that addChangeListener is not being called when I add/update data. This is my Code (Kotlin): In ...
-1
votes
1answer
9 views

Session error. The type of the Realm file was invalid

I'm trying to use Realm Object Server, but can't access to data.enter image description here Can you say why I getting this error? Platform - Android. Language - Kotlin. Realm version - 5.4.0
0
votes
1answer
39 views

Json can not cast data into my model

using object mapper and realm as a database. I'm getting a JSON from my server which contains person class I need to update some of properties then post it to server and update. my person model ...
0
votes
0answers
40 views

Crashing when attempting to write to realm

I have an app that takes recordings of passing vehicles and information about them. A client of ours is experiencing a crash when using the app, but I can't find the source. This is the report that I ...
1
vote
1answer
19 views

Case insensitive primary key realm swift

I have an object with the following structure: class REObject:Object { dynamic var id = "" dynamic var status = "" override static func primaryKey() -> String? { return "id" } ...