Hello I have an app with an Event entity that has a to-many-relationship to a Date entity that contains MULTIPLE startDates and endDates for each event. In my list view I need to sort the events by the next available startDate (or endDate) from the to-many-relationship. First I created a transient property in the Date entity that made all the necessary calculations (comparing to present date etc) but then quickly realized that you cannot sort the fetchedResultsController using a transient property.
I cannot make the calculations at the time the start and end dates are created, because there is more than one startDate and endDate for each event and which ones to use can only be determined on demand by comparing them to the present date.
Any guidance on which way to go with this would be greatly appreciated.