Using NSPredicateEditor with core data
Using NSPredicateEditor with core data
- Subject: Using NSPredicateEditor with core data
- From: Gustavo Pizano <email@hidden>
- Date: Fri, 13 Aug 2010 17:45:39 +0200
Hello all once again.
I have been searching but I hadn't found something useful, so please before if you know a place I can look at let me know.
I have these 3 Entities
ExpenditureGroup:
name
icon.
-----------------------
toExpenditures. ->>
Expenditure
creationDate
location
total
--------------------
toExpenditureGroup ->
toExpenditureDetails ->>
ExpenditureDetail
detailDescrb
subTotal
----------------------
toExpenditure ->
also I have an arrayController that fetches all the ExpenditureGroup Entities called _expenditureGorupArrayController.
in my predicate editor I added the NSPredicateEditorRowTemplates with key paths for toExpenditures.location, toExpenditures.creationDate, toExpenditures.total, toExpenditures.toExpenditrueDetails.detailDescrb and finally toExpenditures.toExpenditureDetails.subTotal.
I dunno if those last 2 are ok.. my guess NO.
anyway, when I set the predicate, Im setting into the _expenditureGroupArrayController setFilterPredicate, and pass the predicate I just created, but nothing seems to work.
I was reading apple docs, and I see here I need to do some join, but there it says its not possible, that I have to fetch first something and then using operators get the other required objects.
I really dunno even if the key paths I set for the templates are ok or no, because I thought that If im gonna apply the predicate to the arraycontroller with entity is ExpenditureGroup, then I can simple use the relationships.
Any suggestion?
Thx
Gustavo
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden