I am trying to figure out how to use Core Data with relationships. I have used Core Data before, but only the very basics sans relationships (which worked for my needs at the time).
I have a Trip
entity that can have many Node
s. When the user presses a "Start" button, I want to initialize the Trip
entity and start storing all of the Node
s inside of that Trip
, and then when the user presses a "Stop" button, I want it to calculate all of the Trip
attributes and store it all together. How do I save with respect to these entities?
使用IDE生成MO子类,它将创建用于设置nodeInTrip和tripsInNode关系的方法。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.