开发者

What's the ORM used by yii?

Did t开发者_如何学运维hey implement it themselves?


Their ORM seems to be called Yii Active Record.


From Yii Site

And Yii Active Record (AR), implemented as a widely adopted Object-Relational Mapping (ORM) approach, further simplifies database programming. Representing a table in terms of a class and a row an instance, Yii AR eliminates the repetitive task of writing those SQL statements that mainly deal with CRUD (create, read, update and delete) operations.

This is the documentation about AR: www.yiiframework.com/doc/guide/database.ar This is the documenation API: http://www.yiiframework.com/doc/api/1.1/CActiveRecord

I really like it. I use Yii since a couple of year and I think that AR is very fast :)


Yii ORM is called "Active Record" is mostly inspired by Ruby on Rails Active Record (even if the "Active Record pattern" is used in many languages: http://en.wikipedia.org/wiki/Active_record_pattern ). It was of course developed by the Yii developers team (mostly by its creator Qiang Xue, I guess). The same concept was improved for Yii 2. Yii guide gives credit to Ruby on Rails AR when talking about Named Scopes: http://www.yiiframework.com/doc/guide/1.1/en/database.ar#named-scopes I am not an expert of Ruby on Rails, but I know relations are defined in a very similar way in the two ORMs: http://www.yiiframework.com/doc/guide/1.1/en/database.arr#declaring-relationship

Active Record in Ruby on Rails: http://guides.rubyonrails.org/

The ActiveRecord class in Ruby on Rails: http://ar.rubyonrails.org/

Active Record in Yii: http://www.yiiframework.com/doc/guide/1.1/en/database.ar

The CActiveRecord class in Yii: http://www.yiiframework.com/doc/api/1.1/CActiveRecord

And last but not least, the Yii developers team in GitHub! https://github.com/yiisoft?tab=members

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜