I canβt figure it out. What I read about transient properties tells me that they can be identified in an object model of type undefined. But the compiler complains about this with an error that the type is unknown.
In the Core Dat Programming Guide:
If the unsupported attribute is an object, then in the model of the managed object you specify its type as undefined and that it is temporary. When you implement a custom entity class, there is no need to add an instance variable for the attribute - you can use the closed internal storage of the managed object. It should be noted that the implementations described below are that they cache the transition value. This makes access to value more efficient - it is also necessary for managing change. If you define your own instance variables, you should clear these variables in didTurnIntoFault, not dealloc or terminate.
Here is the header file:
I am trying to include properties for MKAnnotation with a title, subtitles and coordinates. Here I need to get subtitles from other fields and get the coordinate in longitude and latitude.
I'm not sure how to come to terms with what the manual says and what looks obviously wrong, and the compiler talks about it.
Once I get the header to the right, I can get the implementation correctly, and I will use awakeFromFault to set the values. I'm not sure if I need to release subtitles that will be NSString using didTurnIntoFault, but this is similar to what the manual says does.
I have not seen a really good example of how to implement a simple transient property. I am tempted to add properties to the managed entity object and forget about mentioning it in the managed entity model. But it seems that I will ignore something if I do this.
source share