getEntity() is deprecated