Add patches needed for Entity API to work with restful.