iphone - CoreData Entity Inheritance -
Consider that I have two entities with the following relationships:
Lt; - & gt; & Gt; Entity B. (one-to-many and inverse)
Now I think that I have another entity Entity C, which contains all the properties of Entity B and some others, the following relationship Together:
Unit A & lt; - & gt; & Gt; Unit C (one-to-many and inverse)
Now I can improve the architecture by making Unit B the parent of the unit C.
Unit B ^ | Entity C
Now, my question is, as much as the relationship (s) of the relationship (s) as inherited by the unit C? I mean, do I still need to have the following relationship (differently) ?:
unit A & lt; - & gt; & Gt; Unit C
In addition, I could not find a good example for the core inheritance for the unit data in the Apple document. Does anyone detect any online resource that tells this, for example (preferably)?
Yes, attributes and relationships and everything else will be inherited. Although be careful, such child institutions will share the same table with the parent unit in the sculpt. So if you have a heritage from B, then a table will be created in sqlite which has properties for both B and C, which clearly voids in the table. It is not a lot of problem with such a simple heritage, but if you decide to get "creative" you can finish your entire model in a table.
Comments
Post a Comment