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

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -