changed patch check document in database not patch document