开发者

How to share an entity between two different core data models

开发者 https://www.devze.com 2023-02-01 12:36 出处:网络
I\'m wondering how to share an entity between two different core data models? For example, I have a \"Universe\" model which describes a \"WorldData\" with its \"CountryData\". And in another hand, I

I'm wondering how to share an entity between two different core data models?

For example, I have a "Universe" model which describes a "WorldData" with its "CountryData". And in another hand, I have a "Population" model which describes a "HumanDa开发者_运维百科ta" with its "CountryData".

I definitely want to keep my models separated.

Thanks in advance.


Have you checked the Core Data Guide? Managing relationships between entities is pretty basic.

If you want to manage a relationship between your Universe entities and your Population entities, you should describe them in the same model. Off the top of my head, I can't think of any benefits of putting two related entities in different Core Data Models.

0

精彩评论

暂无评论...
验证码 换一张
取 消