The more I work with Core Data, the more I think I should never be just fetching objects directly; that, instead, I want to be fetching only the data I need and only in the structure I need.
@grantjbutler ORMs are Not Good imho
@pcperini the ORMs I’ve used on mobile have been not great. I keep thinking I should try my hand at creating my own, but that’s probably easier said than done.
@grantjbutler A lot of it is that state makes everything stupid complicated. Type-safe wrappers around queries? 👌
@pcperini more that none of the ones I’ve used have been very Swifty. I want to use value types to get a handle on immutability, with Codable as the primary way of integrating with the ORM.
For example, if I have an app that shows blog posts, and I want to look at a list of all blog posts, I should only fetch the things I need (title, date posted, number of comments, for example) as a dictionary result type, and never as an array of Post managed objects.