好的 PHP ORM 库? [英] Good PHP ORM Library?
问题描述
PHP 有没有好的对象关系映射库?
Is there a good object-relational-mapping library for PHP?
我知道 PDO/ADO,但他们似乎只提供数据库供应商之间差异的抽象,而不是域模型和关系模型之间的实际映射.我正在寻找一个 PHP 库,它的功能类似于 Hibernate 为Java 和 NHibernate 适用于 .NET.
I know of PDO/ADO, but they seem to only provide abstraction of differences between database vendors not an actual mapping between the domain model and the relational model. I'm looking for a PHP library that functions similarly to the way Hibernate does for Java and NHibernate does for .NET.
推荐答案
研究Doctrine.
Doctrine 1.2 实现了 Active Record.Doctrine 2+ 是一个 DataMapper ORM.
Doctrine 1.2 implements Active Record. Doctrine 2+ is a DataMapper ORM.
此外,请查看 Xyster.它基于数据映射器模式.
Also, check out Xyster. It's based on the Data Mapper pattern.
另外,请查看 DataMapper 与 Active Record.
这篇关于好的 PHP ORM 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!