I have 2 entities : Post & Category , Post entity has relationship to one with Category, each Post has One Category.
Post Category ---- -------- postId categoryId title title slug slug category ----> posts
what i need here is NSFetchRequest to fetch posts by date, then to groupBy Category.
so result would be something like:
Category1: - Post 1 - Post 2
Category 2: - Post 3 - Post 4
i've tried :
[_fetchRequest setPropertiesToGroupBy:[NSArray arrayWithObjects:@"category.categoryId", nil]];
and :
[_fetchRequest setPropertiesToGroupBy:[NSArray arrayWithObjects:@"category", nil]];
with no success. Any suggestions ?
Thanks.