Update Realm insert operation to not update the object internally

This commit is contained in:
Pedro Piñera Buendía 2016-05-08 12:05:42 +02:00
parent 824ea3d3f0
commit 46e630406d

View File

@ -17,7 +17,7 @@ extension Realm: Context {
public func insert<T: Entity>(entity: T) throws {
guard let _ = T.self as? Object.Type else { throw Error.InvalidType }
self.add(entity as! Object, update: true)
self.add(entity as! Object, update: false)
}
public func new<T: Entity>() throws -> T {