Skip to content

Modifications to DF_Model_result->populate()

Robert Sinton requested to merge feature/populate_returns_result into master

What I did

  • Now returns the result object for chaining.
    • This is useful for chained calls like $my_thing = $this->thing_model->get()->populate($data)->save();
  • Declared the parameter type as array, and changed default value to an empty array.

Implications

None

Setup

None

How to test

  • Code review.
  • Test with a call like $my_thing = $this->thing_model->get()->populate($data)->save();
    • Confirm that the updated object is saved to the database.

Merge request reports