When doing Core Data versioning, when creating a Mapping Model, when writing Custom Value Expressions, I understand that the syntax to be used is that described in the Predicate Programming Guide > Predicate Format String Syntax.
But I can't figure out how to do non-trivial mappings like these... Example 1: Old data model attribute type is an Integer16. I want to map this to a Boolean which is NO if the old value was 0 and YES if != 0. Example 2: Old and new data model attribute types are both String. If the string is "Joe", I want to map it to "Jose"; else, map the original value. It seems like the concept of "mapping" should support stuff like this, but I can't find any such examples. In MigratingDepartmentAndEmployees, all I see is mapping from one attribute name to another. Relations get a complicated expression like this generated automatically: FUNCTION($manager, "destinationInstancesForEntityMappingNamed:sourceInstances:" , "EmployeeToEmployee", $source.employees) but I have no idea where that FUNCTION keyword comes from (it's not listed as a reserved word in the Predicate Programming Guide). It seems like I should be able to make my own FUNCTION to implement the stuff I need in my examples. Is this possible? Thanks, Jerry Krinock _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com