I am working on an iOS app using Core Data.
Lets say I have 2 objects in Core Data, Object A and Object B.
A has a one-to-many relationship with B. It has an inverse property set.. so that the B objects point back to A. no problem, I understand that.
However, in the A object I want to keep track of the current B. So, I also have an Attribute called currentB.. it should indicate which object B is the current one.
How would an inverse relationship work with that? because only 1 B object can inverse back to A as the current one.
I can create the core data object model with a one way relationship, however Apple frowns on it mainly because it an cause some issues if an object is deleted and has a one way relationship. it only causes compiler warnings.. so it works one way. but it keeps bugging me that there has to be a logical way to think and name the inverse relationship that I'm trying to avoid.
Any insight from Core Data gurus?
Lets say I have 2 objects in Core Data, Object A and Object B.
A has a one-to-many relationship with B. It has an inverse property set.. so that the B objects point back to A. no problem, I understand that.
However, in the A object I want to keep track of the current B. So, I also have an Attribute called currentB.. it should indicate which object B is the current one.
How would an inverse relationship work with that? because only 1 B object can inverse back to A as the current one.
I can create the core data object model with a one way relationship, however Apple frowns on it mainly because it an cause some issues if an object is deleted and has a one way relationship. it only causes compiler warnings.. so it works one way. but it keeps bugging me that there has to be a logical way to think and name the inverse relationship that I'm trying to avoid.
Any insight from Core Data gurus?
