ios - LAST object from a to-many relationship in a NSPredicate - Core Data -


is possible use nspredicate compare last object of to-many relationship in core data?

for example:

nspredicate *pred = [nspredicate predicatewithformat:@"(last messages.userid = %i)", myuserid]; 

messages relationship to-many user -> message entities.

this works:

nspredicate *pred = [nspredicate predicatewithformat:@"(any messages.userid = %i)", myuserid]; 

but compare last object of nsorderedset messages.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -