Fix return's object to be like function getEntityByName