A judgment by a court in favor of foreclosure of a mortgage or deed of trust, which orders that the real property which secured the debt be sold under foreclosure proceedings to pay the debt.