I have tried to use fetched properties a couple of times, and although it seems to be the right approach, it never works.
In my latest attempt I added the fetch
Adding to @Peter's answer. Here's how I got it working in Swift 2.0 and Xcode 7:
import Foundation
import CoreData
@objc(Card)
class Card: NSManagedObject {
@NSManaged var statsOfTypeOne: [Stat]
}
And then, to read the fetched property:
managedObjectContext.refreshObject(someCard, mergeChanges: true)
// This works and returns [Stat] type
someCard.statsOfTypeOne
// So does this
someCard.valueForkey("statsOfTypeOne") as! [Stat]