I have Week model that has Day as child objects. There is "days" relation property in Week model to access all associated Day objects. Day model has duration property.
How can I figure out sum of day's durations for specified Week object? It would be great to have code example how to create a predicate object with @sum function.
Also is it possible to have "calculated" weekDuration property on Week class that given value of sum of related day's durations during fetch? It would be most elegant solution for that problems, but I don't believe that is possible with CoreData.