Use new api to set entities.