Friday 15 May 2015

Multiple similar entities or use the same one in core data? -


So I have a client unit that needs a relationship from a phone number unit so that many phone numbers are allowed. And I have an employee unit which also needs to allow multiple phone numbers for a relationship with the phone number unit. Should I make two separate phone number companies or can I use the same unit in some way for both?

I will create your customer and employee entities There is a parent unit called person for the person unit will belong to the PhoneNumber unit.

Inherent entities have the same properties and the relationships are in the form of their parent unit. Of course you can also add properties and relationships of "children" - I left in screenshot

Something like this:

 Enter image details here

You can configure parent unit in core data pane in core data inspector

No comments:

Post a Comment