Paparazzi 2 - setting up core data model

0 views
Skip to first unread message

mcs07

unread,
Mar 7, 2010, 6:35:06 PM3/7/10
to iPhone Application Development Auditors
I'm setting my entities in the managed object model and I'm struggling
to figure out what attributes and relationships they should have.

It's pretty clear that we need both a Person and a Photo entity. The
photo should have name and path attributes, as well as a user
attribute that somehow links to the Person entity - possibly via a
relationship?

The person entity has to have a name attribute, as well as a set of
photos. Is this just set by a one-to-many relationship to the photo
entity?

Am I on the right track? Any hints appreciated.

Cris

unread,
Mar 10, 2010, 9:40:29 AM3/10/10
to iPhone Application Development Auditors
You're exactly on the right track. The attributes are unique to the
entity and you've nailed those. Then the relationships are to other
entities, i.e. a Photo has a person relationship and a Person has a
photos relationship.

I find it easiest to determine if its a one to one or one to many
relationship by asking the question, "Can EntityA have one or many
EntityB's" and use that to determine the appropriate relationship
type.

Reply all
Reply to author
Forward
0 new messages