 			if not @database.data[@name].records[id]?
 				reject(new Error("Can't update this record. It's not in the database."))
 
-			@database.__addFilters(id, DBUtils.clone(record))
+			@database.__addFilters(id, DBUtils.clone(record), filter)
 				.then (result) =>
 					@database.data[@name].records[result.id] = result.record
 					# update all indices

			resolve(true)


	__addFilters: (id, record) ->
		DBUtils.applyFilters(id, record, @filters.in)


	__removeFilters: (id, record) ->
		DBUtils.applyFilters(id, record, @filters.out)




		else
			return [o]

	@applyFilters = (id, record, fns, useFilters) ->
		fns = iterator(fns)
		fn = fns.next()
		original = DBUtils.clone(record)
