I'm curious about structuring NSManagedObjects, specifically the nesting of them. This is my first time designing a data model so let me explain a bit before my question. Let's say I have an NSManagedObject for Users. Users have many different properties:
- first name : NSString
- last name : NSString
- bio : NSString
- photo : NSData
- email : NSString
- registrationTimestamp : NSDate
- password : NSString
- username : NSString
- followers : User (many relationship)
- people they are following : User (many relationship)
There are a lot of properties within that object, and there could be more. So my question essentially is, is it safe, or even proper, to nest NSManagedObjects? So that instead of all of those properties I have:
- information : UserInformation
- registration : UserRegistration
- followers : User
- following : User
Where UserInformation and UserRegistration would be separate NSManagedObjects that hold some of those original properties. I understand that this might not be the best case for nested objects, but what if I had more complicated objects that would be easier to understand if they were nested.
Thanks in advance for the input!