ios - Coredata chained Relationship -
what best way update or add data if relationships
chained.
i have coredata
designed this:
i have 3 entities
1) user
to_many
category2) category
to_many
item3) item
to_one
category
user
required before adding category
, , category
required before adding item
simple. set to-one relationship, corresponding inverse relationship set automatically core data.
newitem.category = category category.user = user
according best practice, renaming clumsy attribute names itemcategory
, categoryuser
, categoryinuser
category
, user
, categories
respectively.
Comments
Post a Comment