You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The machine generated file generates this for transient properties
@NSManaged public
var saved_date_section_title: String?
When I go to override it in the human file like so
override public var saved_date_section_title: String? {
get{
return savedDate?.getStorageString()
}
}
it gives the errors
Cannot override mutable property with read-only property 'saved_date_section_title'
Getter for 'saved_date_section_title' with Objective-C selector 'saved_date_section_title' conflicts with getter for 'saved_date_section_title' from superclass '_CachedOfferImpl' with the same Objective-C selector
I can implement it like so
override public var saved_date_section_title: String? {
get{
return savedDate?.getStorageString()
}
set {
//noop
}
}
but surely that's a code smell
Question
So what's the proper way for implementing a transient property using mogenerator?
The text was updated successfully, but these errors were encountered:
I think making the custom setter empty is the correct way. Effectively, anything passed to the var is ignored. Also, you can't provide a custom getter without providing the custom setter.
Expected Behavior
I saw this SO on how to implement a transient core data property in swift
http://stackoverflow.com/a/36162207/1552116
Actual Behavior
The machine generated file generates this for transient properties
When I go to override it in the human file like so
it gives the errors
I can implement it like so
but surely that's a code smell
Question
So what's the proper way for implementing a transient property using mogenerator?
The text was updated successfully, but these errors were encountered: