ios swift: receiving the data over 3 classes

38 views
Skip to first unread message

Heidi Anselstetter

unread,
Mar 3, 2015, 9:41:50 AM3/3/15
to swift-l...@googlegroups.com
Hi,

My structure is this:

A "User" can have multiple "CardSet". 
"CardSet" has a pointer to "User.objectId"
Each "CardSet" can have multiple "Card".
A "Card" has a pointer to "CardSet.objectId"

When I want to select all Cards for a User - how can I do this?
Can someone help me with the query? 

I know I have to query "Card" get the "cardset" pointer and get for this corresponding cardset the assigned user.

I am absolutely lost here, as I am at the beginning and just overwhelmed by all possibilities...

Dennis W

unread,
Apr 11, 2015, 3:30:23 AM4/11/15
to swift-l...@googlegroups.com
I noticed that nobody responded to your inquiry. Did you ever get an answer to your question from another source?

Jens Alfke

unread,
Apr 11, 2015, 3:22:10 PM4/11/15
to Dennis W, swift-l...@googlegroups.com

> On Apr 11, 2015, at 12:30 AM, Dennis W <dkw...@gmail.com> wrote:
>
> I noticed that nobody responded to your inquiry. Did you ever get an answer to your question from another source?

The question was really unclear — it sounds like she wants to use some sort of database API since she used terms like “object id” and “query”, but it doesn’t sound like Core Data.

If this is just using pure Swift, it would be trivial to set it up by using object references and Array or Set collections.

—Jens
Reply all
Reply to author
Forward
0 new messages