Skip to content

Instantly share code, notes, and snippets.

@badeen
Created February 27, 2013 20:16
Show Gist options
  • Save badeen/5051302 to your computer and use it in GitHub Desktop.
Save badeen/5051302 to your computer and use it in GitHub Desktop.
Is this a valid fetched property predicate? If not, what am I doing wrong and/or can I actually do this with a fetched property? I'm guessing it's not because I believe I'm crashing when attempting to use it. The goal is to ask a Match instance for all of its messages which have not been viewed.
"match.matchID == $FETCH_SOURCE.matchID && viewed == NO".
-------------------MODEL DETAILS ---------------------
Match (entity)
messages (to-many relationship with Message entity)
viewed (boolean attribute)
matchID (string attribute)
unviewedMessages (fetched property with - see above)
PREDICATE = "match.matchID == $FETCH_SOURCE.matchID && viewed == NO"
DESTINATION = Message
Message (entity)
match (inverse relationship for Match.messages)
viewed (boolean attribute)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment