好的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 实现了活动记录。 Doctrine 2+ 是DataMapper ORM。
Doctrine 1.2 implements Active Record. Doctrine 2+ is a DataMapper ORM.
此外,请查看 Xyster 。它基于Data Mapper模式。
Also, check out Xyster. It's based on the Data Mapper pattern.
另外,请查看 DataMapper与活动记录。
这篇关于好的PHP ORM库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!