Core Data: Predicate for first element in orderd relationship

后端 未结 1 1674
耶瑟儿~
耶瑟儿~ 2020-12-21 14:28

I have this to-many relationship which contains at least one element:

Appointment <<------>> Invitee

appointment.invitee

1条回答
  •  南方客
    南方客 (楼主)
    2020-12-21 15:00

    Clearly, this a question that not even the most expert Core Data savants can answer.

    The workaround is to model the first element as a separate to-one relationship and the rest as an optional to-many relationship based on the same related entity.

    Appointment <<------>  mainInvitee        (Invitee)
                <<------>> additionalInvitees (Invitee)
    

    0 讨论(0)
提交回复
热议问题