Comments (5)
Hi !
Sorry for the late answer. I've implemented your idea, and it's working like a charm. Nice workaround that'll do the trick for now.
I hadn't thought about it.
Thanks for your help. I'll let you close the issue if you want to close it, or leave it open for now.
from unrealm.
Does the problem exist even if you change SomeArray
with String
?
from unrealm.
It's working just fine when changing it to a String
.
from unrealm.
I'm trying to save an object from another model, inside an array, inside that dictionary.
So basically, this is what i'm trying to achieve:
var dictionary: [Int: [DataModel]] = [:]
:
struct DataModel: Realmable, Codable {
}
from unrealm.
Currently saving an array of objects in a dictionary is not supported.
As a workaround, I can suggest you do the following:
- Add a new private variable with type: [Int: String] (say
var underlyingDic: [Int: String] = [:]
- Add your old variable to the ignored list
- In the setter of your old variable convert your array of
Codable
s to json string, and assign to the newly created variable - In the getter of your old variable read the json string form the newly created var and convert it back.
from unrealm.
Related Issues (20)
- Version solving failed HOT 1
- Please update to support Realm 10.7.4 HOT 3
- Crash in Realm+Unrealm.swift HOT 2
- How to update only some properties of record? HOT 4
- variable name problem. HOT 1
- Problem using enum HOT 2
- can't build on xCode 13 RC HOT 5
- Bool can't add to realm HOT 4
- Xcode 13 support HOT 8
- - There must be a primary key property named '_id' on a synchronized Realm but none was found for type 'RLMOptional' HOT 4
- Why does non-optional types have optional: true? HOT 5
- Swift Package Manager on SPM branch throws error "Package resolution failed"
- RealmableEnum not able to determine RawValue
- Instance method 'min(ofProperty:)' requires that 'T' conform to '_HasPersistedType' HOT 4
- Can't build xcode14.2 HOT 15
- Can't build XCode 14.3 using CocoaPods HOT 1
- Can't build on Xcode 14.2 with 1.9.5
- Error with Optional RealmableEnumString on launch HOT 1
- Error running ,in Xcode 15 with 1.9.5
- Use with Flexible Sync HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unrealm.