Hi,
I am having some trouble modeling my data. I would like to implement
the following:

User can create files and folders (they don't have to be real folders/files).
Folders can contain files or other folders
Files have:
title,
summary and
8 children
Each child also has a title and a summary and could have 8 children (optionally)
This could be as many levels (recursive) as the user desires.
I am not sure how to express this in CoreData. Could someone give a hand here?

This is what I've done: http://yfrog.com/j2o1op

"Child" entity with "title" and "summary" attributes and "children"
(to-many) relationship pointing to "Child" entity
"File" entity with "isDirectory" and "name" attributes and "files"
(to-many)  relationship pointing to "File" entity  and "children"
(to-many) relationship pointing to "Child" entity.

Doing that gets me a warning:
File.children -- to-many relationship does not have an inverse:  this
is an advanced setting (no object can be in multiple destinations for
a specific relationship)
Why is that? I've tried to set the inverse relationship but there are
no options to choose from.

I am not sure if this well implements above structure. I am in the right way?
Thanks in advance.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to