Swift 4 CoreData NSFetchRequest: sum over computed variable
问题 I'm using CoreData for persistence and would like to use a NSFetchRequest with an NSExpression(forFunction: "sum:" ...). I have three Entities Entity A: name: String value: Int64 Entity B: name: String Entity C: relationship1: A relationship2: B value: Int64 I have a separate Entity for a relationship between an A- and an B-Entity, because a relationship also has an Int64 Value. I guess this is the easiest solution not to sum up one attribute of a given set of Cs (using a NSPredicate to