Welcome Guest, Not a member yet? Register   Sign In
activerecord, really?
#1

[eluser]Unknown[/eluser]
I'm still new to CodeIgniter and I've been having trouble wrapping my head around the stated idea that CodeIgniter models have anything to do with the ActiveRecord pattern.

From http://www.martinfowler.com/eaaCatalog/a...ecord.html

Quote:Active Record

An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.

From what I've seen, an instance of a CodeIgniter model class does not represent a row in the database table. Rather, an instance of a CodeIgniter model class might have a method to select a row from the database table and return that row as a simple PHP array.

Am I completely misunderstanding CodeIgniter models?

Thanks.
#2

[eluser]CroNiX[/eluser]
It's not modeled after the "active record pattern". They have changed the name to "query builder" in CI3 to avoid confusion.




Theme © iAndrew 2016 - Forum software by © MyBB