ios - Save EVObjects with CoreData -
i need save data coredata. thats not problem @ all. problem is, data created evreflection therefore inherits class evobject. save gathered data coredata have inherit nsmanagedobject. problem swift not allow inherit multiple classes. appreciate tips.
class device : evobject { var channel : [channel] = [channel]() var name : string = "" var ise_id : int = 0 var unreach : bool = false var sticky_unreach : bool = false var config_pending : bool = false override internal func propertymapping() -> [(string?, string?)] { return [("name", "_name"), ("ise_id", "_ise_id"), ("unreach", "_unreach"), ("sticky_unreach", "_sticky_unreach"), ("config_pending", "_config_pending")] } }
you don't have inherit. can extend them. example:
class user : nsmanagedobject{ @nsmanaged ..... } //extension import evreflection extension user : evreflectable { }
https://github.com/evermeer/evreflection#extending-existing-objects
Comments
Post a Comment