added update flag to Realm insert

This commit is contained in:
Brendan Conron 2016-03-20 20:55:09 -04:00
parent b4e9149483
commit 47b85ccc3d

View File

@ -33,7 +33,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)
self.add(entity as! Object, update: true)
}
/**