Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relationship Sync in Core Data

If we select a core data and I click some relationship. Then I go to Data Model Inspector.

There is a section called Relationship sync. I wonder what it is? I thought core data are syncing relationship by default.

For example, if I do employee.boss = someBoss, then automatically someBoss will add employee to his Employees relationship and oldBoss will remove employee from his/her employees relationship.'

So how come?

The default value for the Synchronization item in Relationship sync is disabled by the way. So the normal synchronization can't be that. Is this about synchronization with server?

I also see attribute sync and entity sync if I select attribute and entity respectively. What the hell is that?

like image 596
user4951 Avatar asked Dec 21 '22 12:12

user4951


1 Answers

Sync in this instance means utilizing synchronization services between different instances of the app running on different devices. It doesn't have anything to do with Core Data per se but just notifies the synchronization services that Core Data is exposing that part of the data model to the synchronization services.

If you are not using synchronization services, you can just ignore the setting.

like image 176
TechZen Avatar answered Jan 12 '23 16:01

TechZen