     }
 
     //todo rename?
-    private func removeRecordsForRecordId(_ recordId: AnyObject, fileLink: String) {
+    private func removeRecordsForRecordId(_ recordId: Any, fileLink: String) {
 
         fileLink.cacheDBFileLinkRemoveFileWithFolder(self.db.folder)
 


        if let fileLink = fileLinkForRecordId(recordId) {

            removeRecordsForRecordId(recordId as AnyObject, fileLink:fileLink)
        }
    }


            if let data = data {
                update(data: data, forRecord:recordId, fileLink:fileLink)
            } else {
                removeRecordsForRecordId(recordId, fileLink:fileLink)
            }
            return
        }
