filter child entities collections with predicate in IOS (objective c )? -


i want set predicate on fire date.

attribute alerts of entity history nsorderset.

enter image description here

nsfetchrequest *fetchrequest = [[nsfetchrequest alloc]initwithentityname:@"history"];     nstimeinterval interval = [[nsdate date] timeintervalsince1970]; nsdate *tempcurrent = [nsdate datewithtimeintervalsince1970:interval];  // firetime nspredicate *predicate = [nspredicate predicatewithformat:@"alerts.firetime < %@", tempcurrent]; [fetchrequest setpredicate:predicate]; [[managedobjectcontext executefetchrequest:fetchrequest error:nil] count]; nsinteger count = [managedobjectcontext countforfetchrequest:fetchrequest error:nil]; nslog(@"%li",(long)count);` 

problem fetched objects count equal zero. no data fetched core data.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -