(07-27-2017, 06:07 AM)kilishan Wrote: What you're describing is part of the ActiveRecord pattern where the representation of of the db row can save itself back, like Eloquent. What we have here is not trying to follow ActiveRecord, and honestly I'm not a big fan of the ActiveRecord pattern. The Entity class is part of the Repository pattern which keeps the representation of the data (the entity) separate from how it's persisted. By divorcing the representation itself from how it's stored it creates much more long-term flexibility and stability.
Note: I use Laravel daily at the company I'm in, so I'm very familiar with it and why people like it, but still not a fan of that pattern.
agreeable, i just started using laravel about a month ago, it's fun. but its so deep, that's why i look forward to codeigniter having some enhanced database feature like the model relationship and more.