realm-mobile-platform

Realm Migration of a String field inside a new RealmList

旧街凉风 提交于 2021-01-04 07:05:31
问题 Conversation class previously had a string field named "message". Now this "message" field is removed and i have added a "RealmList allMessages" inside Conversation class instead of old "message" field. ChatMessage class has a field name "messageText". How can i migrate "message" from Conversation class to "messageText" of list "allMessages"?? public class ChatMessage extends RealmObject implements Parcelable { .... private String messageText; .... } Old Conversation class. public class

Realm Migration of a String field inside a new RealmList

烈酒焚心 提交于 2021-01-04 07:04:03
问题 Conversation class previously had a string field named "message". Now this "message" field is removed and i have added a "RealmList allMessages" inside Conversation class instead of old "message" field. ChatMessage class has a field name "messageText". How can i migrate "message" from Conversation class to "messageText" of list "allMessages"?? public class ChatMessage extends RealmObject implements Parcelable { .... private String messageText; .... } Old Conversation class. public class

how to store java list in realm android database

↘锁芯ラ 提交于 2020-06-25 09:02:08
问题 How we can store java list in realm android database. I try to store it by using setter method present in my model, but it doesn't work and I get "Each element of 'value' must be a valid managed object" in exception message. public void storeNewsList(String categoryId, List<News> newsList) { Realm realm = Realm.getDefaultInstance(); realm.beginTransaction(); NewsList newsListObj = realm.createObject(NewsList.class); newsListObj.setNewsList(new RealmList<>(newsList.toArray(new News[newsList

Drop a table in a RealmSwift migration

心不动则不痛 提交于 2020-04-18 09:59:01
问题 I am removing an old unused table from the schema. How can I delete it (DROP Table) from older versions of the app? What I have tried so far Removed GameScore.self from configration.objectTypes Bumped schema version Run the app Opened Realm Studio and the table GameScore is still there with the data that was already there previously Adding config.migrationBlock = { migration, oldSchemaVersion in if oldSchemaVersion < 10 { migration.enumerateObjects(ofType: "GameScore", { (oldObject, newObject

Drop a table in a RealmSwift migration

て烟熏妆下的殇ゞ 提交于 2020-04-18 09:51:05
问题 I am removing an old unused table from the schema. How can I delete it (DROP Table) from older versions of the app? What I have tried so far Removed GameScore.self from configration.objectTypes Bumped schema version Run the app Opened Realm Studio and the table GameScore is still there with the data that was already there previously Adding config.migrationBlock = { migration, oldSchemaVersion in if oldSchemaVersion < 10 { migration.enumerateObjects(ofType: "GameScore", { (oldObject, newObject

Drop a table in a RealmSwift migration

血红的双手。 提交于 2020-04-18 09:50:31
问题 I am removing an old unused table from the schema. How can I delete it (DROP Table) from older versions of the app? What I have tried so far Removed GameScore.self from configration.objectTypes Bumped schema version Run the app Opened Realm Studio and the table GameScore is still there with the data that was already there previously Adding config.migrationBlock = { migration, oldSchemaVersion in if oldSchemaVersion < 10 { migration.enumerateObjects(ofType: "GameScore", { (oldObject, newObject

Realm Object Server - SSL configuration causes ROS to fail start

半城伤御伤魂 提交于 2020-01-17 06:42:09
问题 Ubuntu 16.04 / ROS v1.3.0 I am attempting to configure my ROS to use secure SSL connections. If I do not make any changes to the configuration.yml - ROS is fine. I can sync and use the dashboard as I would expect. I have obtained an SSL cert from Letsencrypt. I used the CertBot in standalone mode so that I did not have to install or configure Nginx. (My preference is to not install yet another tech/layer - keep it clean!) I have the following certificates/key stored in this folder: /etc

Jackson cannot serialize an my realm object

淺唱寂寞╮ 提交于 2020-01-06 08:07:28
问题 I had a Route object and I saw that I can't serialize it. So I said I'll debug and try to serialize the objects from it, separately. This is my function: public JSONObject getRouteJson(Next_Step step) { JSONObject route = new JSONObject(); try { ObjectMapper mapper = new ObjectMapper(); mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); RouteNonRealm r = new RouteNonRealm(step.getRoute()); String string = mapper.writeValueAsString(r.getDuration()); route.put("duration", string