Squashed commit of the following:
What I did
- Implemented setting of the base model class, and populating data, at instantiation time.
- Implemented automated mapping of base model class based on
DF_Model::$result_class
Implications
- The population of data currently uses a simplistic approach — should really use the table map. Will probably update this later.
- A single result class cannot be re-used between multiple models — otherwise Madness ensues.
Setup
None
How to test
- Code review.
- Test with commit
e31a52d169b899a4ffc7892d3a5f030daae6c91e
on Art Money- Note the changes in that commit.
- Go to the admin screen for an active loan.
- Add new payments to the bottom of the list.
- Confirm that they save, and that the screen refreshes correctly.
- Ensure loading related records works as expected
- Try using this approach in another project.
- Try and break it!