Advertisement
Guest User

Untitled

a guest
May 25th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public protocol Entity {
  2. static func primaryKey() -> String?
  3. }
  4.  
  5. extension NSManagedObject: Entity {
  6.  
  7. // override into your NSManagedObject subclass
  8. public static func primaryKey() -> String? {
  9. return nil
  10. }
  11. }
  12.  
  13. class Track: NSManagedObject {
  14.  
  15. // Insert code here to add functionality to your managed object subclass
  16.  
  17. // come faccio override di questo metodo?
  18. // override static func primaryKey() -> String? {
  19. // return "name"
  20. // }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement