mutualmobile / VIPER-TODO

Example project architected using VIPER
MIT License
70 stars 15 forks source link

Editing entities #5

Closed mAu888 closed 9 years ago

mAu888 commented 9 years ago

As the managed objects should not cross the data manager boundary my question would be: When I would want to edit one single todo item, I only have the reference to the entity. How would you establish the connection to the corresponding managed object. I imagine holding the object id within the entity could be one solution. How do you manage this at mutualmobile?

//cc @cnstoll @jeffgilbert

cnstoll commented 9 years ago

Hola,

In that situation I tend to pass the object id through to identify it again later. That seems to be the most practical thing to do if you're using Core Data. As long as you maintain the convention of only using the id in the model layer for the purpose of saving changes to the data model, then I think this is a pretty reasonable thing to do :)

Thanks,

mAu888 commented 9 years ago

Thanks :+1: