Originally created by @ro22e0 on GitHub (Feb 19, 2017).
Does CoreStore support UserInfo Keys like MagicalRecord ?
Originally created by @ro22e0 on GitHub (Feb 19, 2017).
Does CoreStore support [UserInfo Keys](https://github.com/magicalpanda/MagicalRecord/blob/master/Docs/Importing-Data.md#attributes) like MagicalRecord ?
@DimaAvvakumov Ah, I sort of abandoned this as I didn't like the complete magic string-dependency. Even released an architecture to get rid of xcdatamodels completely (CoreStoreObject.
Let me know if there is a significant benefit for your use-case with userInfo keys instead of the current ImportableObject method.
@JohnEstropia commented on GitHub (Mar 28, 2018):
@DimaAvvakumov Ah, I sort of abandoned this as I didn't like the complete magic string-dependency. Even released an architecture to get rid of `xcdatamodel`s completely ([CoreStoreObject](https://github.com/JohnEstropia/CoreStore#type-safe-corestoreobjects).
Let me know if there is a significant benefit for your use-case with userInfo keys instead of the current `ImportableObject` method.
@DimaAvvakumov commented on GitHub (Mar 29, 2018):
Thank you for answer. UserInfo keys is not my primary goal. I want to custom mapping keys while importing object from json.
For example: json
{
"Id": 1,
"FullName": "John Dow"
}
entity
class User {
var id: Int = 0
var name: String?
}
How can i import this?
@DimaAvvakumov commented on GitHub (Mar 29, 2018):
Thank you for answer. UserInfo keys is not my primary goal. I want to custom mapping keys while importing object from json.
For example:
*json*
```
{
"Id": 1,
"FullName": "John Dow"
}
```
*entity*
```
class User {
var id: Int = 0
var name: String?
}
```
How can i import this?
I have situation in which i have to store pre-fill master data. Sync at app launch event. I have array of Model.
**For example : **
class ToyStory {
var id: Int = 0
var name: String?
init(id : Int, name : String) {
self.id = id
self.name = name
}
}
let modelsArray : [ToyStory] = [
ToyStory(id: 1, name: "Sherrif Woody"),
ToyStory(id: 1, name: "Buzz"),
ToyStory(id: 1, name: "Andy"),
ToyStory(id: 1, name: "Rex")
]
Thank you in advance :)
@Pratik-Sodha commented on GitHub (May 13, 2019):
Thank you for awesome CoreData Wrapper.
I have situation in which i have to store pre-fill master data. Sync at app launch event. I have array of Model.
**For example : **
```
class ToyStory {
var id: Int = 0
var name: String?
init(id : Int, name : String) {
self.id = id
self.name = name
}
}
let modelsArray : [ToyStory] = [
ToyStory(id: 1, name: "Sherrif Woody"),
ToyStory(id: 1, name: "Buzz"),
ToyStory(id: 1, name: "Andy"),
ToyStory(id: 1, name: "Rex")
]
```
Thank you in advance :)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ro22e0 on GitHub (Feb 19, 2017).
Does CoreStore support UserInfo Keys like MagicalRecord ?
@JohnEstropia commented on GitHub (Feb 20, 2017):
Sorry, not yet. This is actually currently being prototyped but there is no release schedule yet.
@DimaAvvakumov commented on GitHub (Mar 28, 2018):
Hi! Thanks for awesome library.
One question - this feature still in prototype state?
@JohnEstropia commented on GitHub (Mar 28, 2018):
@DimaAvvakumov Ah, I sort of abandoned this as I didn't like the complete magic string-dependency. Even released an architecture to get rid of
xcdatamodels completely (CoreStoreObject.Let me know if there is a significant benefit for your use-case with userInfo keys instead of the current
ImportableObjectmethod.@DimaAvvakumov commented on GitHub (Mar 29, 2018):
Thank you for answer. UserInfo keys is not my primary goal. I want to custom mapping keys while importing object from json.
For example:
json
entity
How can i import this?
@JohnEstropia commented on GitHub (Mar 29, 2018):
@DimaAvvakumov Check out the
ImportableUniqueObjectprotocol:https://github.com/JohnEstropia/CoreStore#importing-data
Simple example:
You can then import your object via transactions:
@DimaAvvakumov commented on GitHub (Mar 29, 2018):
Thank you, I'll deal with this.
@JohnEstropia commented on GitHub (Mar 29, 2018):
Sounds tough! 😆
Feel free to ask anything!
@Pratik-Sodha commented on GitHub (May 13, 2019):
Thank you for awesome CoreData Wrapper.
I have situation in which i have to store pre-fill master data. Sync at app launch event. I have array of Model.
**For example : **
Thank you in advance :)