mirror of
https://github.com/modo-studio/SugarRecord.git
synced 2024-09-11 14:36:41 +03:00
added update flag to Realm insert
This commit is contained in:
parent
b4e9149483
commit
47b85ccc3d
@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user