Changed resource to type of entity.