Add `getFieldBy` method for Model.