import CoreData

public protocol Identified: class
{
    var id: Object.Id? { get set }
}

extension Identified
{
    public var identified: Bool {
        return self.id != nil
    }
}

// MARK: -

public protocol Model: class, Identified, Equatable, Hashable
{
    associatedtype Configuration: ModelConfiguration
}

extension Model
{
    public var hashValue: Int {
        return ObjectIdentifier(self).hashValue
    }
}

public func ==<Lhs:Model, Rhs:Model>(lhs: Lhs, rhs: Rhs) -> Bool {
    return lhs === rhs
}

// MARK: -

public protocol ModelInitialiser
{
    init(id: Object.Id?)
}

import CoreData

public protocol Model: class, Equatable, Hashable
{
    associatedtype Configuration: ModelConfiguration

    var id: Object.Id? { get set }
}

extension Model
{
    public var identified: Bool {
        return self.id != nil
    }
}

extension Model
{
    public var hashValue: Int {
        return ObjectIdentifier(self).hashValue
    }
}

public func ==<Lhs:Model, Rhs:Model>(lhs: Lhs, rhs: Rhs) -> Bool {
    return lhs === rhs
}

// MARK: -

public protocol ModelInitialiser
{
    init(id: Object.Id?)
}

--- 
+++ 
@@ -1,17 +1,22 @@
 import CoreData
 
-public protocol Model: class, Equatable, Hashable
+public protocol Identified: class
 {
-    associatedtype Configuration: ModelConfiguration
-
     var id: Object.Id? { get set }
 }
 
-extension Model
+extension Identified
 {
     public var identified: Bool {
         return self.id != nil
     }
+}
+
+// MARK: -
+
+public protocol Model: class, Identified, Equatable, Hashable
+{
+    associatedtype Configuration: ModelConfiguration
 }
 
 extension Model
Add identified protocol underneath model
