             return entity
         }
     }
-    
-    public func deleteEntity(managedObject: T) -> (Bool, NSError?) {
+
+    // deprecated in version 2.1
+    public func createOrGetFirstEntity(whereAttribute attributeName: String, isEqualTo value: AnyObject?) -> T {
+        return self.firstOrCreated(whereAttribute: attributeName, isEqualTo: value)
+    }
+    
+    public func deleteEntity(entity: T) -> (Bool, NSError?) {
         var retrieveExistingObjectError: NSError? = nil
         
-        if let managedObjectInContext = self.context.managedObjectContext.existingObjectWithID(managedObject.objectID, error: &retrieveExistingObjectError) {
+        if let managedObjectInContext = self.context.managedObjectContext.existingObjectWithID(entity.objectID, error: &retrieveExistingObjectError) {
             self.context.managedObjectContext.deleteObject(managedObjectInContext)
-            return (managedObject.deleted || managedObject.managedObjectContext == nil, nil)
+            return (entity.deleted || entity.managedObjectContext == nil, nil)
         }
         else {
             return (false, retrieveExistingObjectError)
         }
     }
     
-    public func refreshEntity(managedObject: T) {
-        if let moc = managedObject.managedObjectContext {
-            moc.refreshObject(managedObject, mergeChanges: true)
+    public func refreshEntity(entity: T) {
+        if let moc = entity.managedObjectContext {
+            moc.refreshObject(entity, mergeChanges: true)
         }
     }
     

    
}

// MARK: Attribute predicate support

extension Table {
    

    
}

// MARK: - Attribute - ordering support

extension Table {
    
