Fix reference query error.Return all reference codes for query.Update
reference query tests