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.
发布评论
评论(3)
他们的 ORM 似乎被称为 Yii Active Record。
Their ORM seems to be called Yii Active Record.
来自 Yii 网站
这是关于 AR 的文档: www.yiiframework.com/doc/guide/database.ar< /a>
这是文档 API: http://www.yiiframework.com/doc/api/1.1 /CActiveRecord
我真的很喜欢它。我使用 Yii 已经有几年了,我认为 AR 非常快:)
From Yii Site
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 被称为“Active Record”,主要受到 Ruby on Rails Active Record 的启发(即使“Active Record 模式”在许多语言中使用:http://en.wikipedia.org/wiki/Active_record_pattern )。它当然是由 Yii 开发团队开发的(我猜主要是它的创建者薛强)。 Yii 2 改进了相同的概念。
Yii 指南在谈论命名范围时对 Ruby on Rails AR 给予了认可: http://www.yiiframework.com/doc/guide/1.1/en/database.ar#named-scopes
我不是 Ruby on Rails 的专家,但我知道这两个 ORM 中的关系定义方式非常相似: http://www.yiiframework.com/doc/guide/1.1/en/database.arr#declaring-relationship
Ruby on Rails 中的活动记录:
http://guides.rubyonrails.org/
Ruby on Rails 中的 ActiveRecord 类:
http://ar.rubyonrails.org/
Yii 中的活动记录:
http://www.yiiframework.com/doc/guide/1.1/ en/database.ar
Yii 中的 CActiveRecord 类:
http://www.yiiframework.com/doc/api/1.1/CActiveRecord
最后但并非最不重要的一点是 GitHub 中的 Yii 开发团队!
https://github.com/yiisoft?tab=members
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