iOS CoreData inverse relationships to itself

2019-01-26 19:30发布

I am trying to build a CoreData model similar to Twitter user when User can have many other users who follows him and many other users followed by him. I attached the model that I have tried to use but seems it is getting to complicating to retrieve followers. What is the best way to deal with this situation?

enter image description here

1条回答
smile是对你的礼貌
2楼-- · 2019-01-26 20:23

I think you need to create a second relationship (followedBy) and make that the inverse.

查看更多
登录 后发表回答