[Solar-talk] The new model class discussion, some questions

Rodrigo Moraes rodrigo.moraes at gmail.com
Sun Feb 18 16:50:29 PST 2007


On 2/18/07, Andreas Ravnestad wrote:
> It looks similar, but those two pieces of code are doing two very
> different operations (yikes again). The doctrine example returns
> instances of User. A User is a model whose instance maps directly to one
> record, and is extended from Doctrine_Record. The solar example returns
> instances of who-knows-what. It might be  Tipos_Sql_Model_Record_Blog.
> Or Solar_Sql_Model_Record. Who could possibly tell without peeking at
> the class stack? But the *model* is still Solar_Model_Users ($users and
> $user are different types) - and this is where my active record alarm
> bell (tm) goes ringing.

* who-knows-what = a instance of Solar_Sql_Model_Record ;)

The main difference as I see is that in DB_DataObject & Doctrine (and
maybe Rails?) is that you have a record that is the same class of the
"model",  and it wraps the table. Solar has a model/table that returns
a record which wraps the model/table.

Yeah, this confuses me and perhaps makes no sense. I also don't know
what this implies.

rodrigo
-------------------------------
http://tipos.com.br


More information about the solar-talk mailing list