I have Company entity in Core Data that has relationship one-to-many Activities
I've added there derived property to Company
activities.@count
but then accessing in SwiftUI view this property gives me invalid result. It usually works ok but on logout/login where I think there is company update and relationship update it for the first time gives 0 count of activities in spite there are activities related to company
using this
self.user?.company?.activitiesCount ?? 0
gives 0
using this
self.user?.company?.activities.count ?? 0
gives 75