10

I am looking for a good ORM (i.e. Active Record) which use php extension PDO as base.Any suggestions?

7 Answers 7

12

Doctrine or Propel.

Sign up to request clarification or add additional context in comments.

3 Comments

My 2 cents: Doctrine all the way.
I prefer Doctrine as well, but though I would save this thread from the "religious-war" tag :)
Definitly Doctrine ; especially considering Propel might not be developped actively in the future : groups.google.com/group/propel-development/msg/…
2

Definitely go with Doctrine.

Comments

2

If you're using PHP 5.3 there's a PHP implementation of ActiveRecord available now (link). It's up on github as well incase you want to watch or fork it. I checked the source on github and it does use PDO at its core to execute the queries.

Comments

2

I haven't used Doctrine or Propel. Propel looks straightforward and very nice (might have to give it a try) .. Doctrine seems to have a lot more to it than just ActiveRecord ORM. I'm a big fan of phpactiverecord (http://www.phpactiverecord.org/). It's simple, makes sense, and built for MVC architecture. I had used CodeIgniter's ActiveRecord in the past, this is similar: all php, very easy to setup a new connection, I particularly like the Dynamic finders, basically lets you put the field of the "WHERE" in the function instead of having to give an associative array. Propel might have this too, ex:

$book = Book::find_by_title('War and Peace'); 

versus:

$book = Book:find('all', array('conditions' => "title = 'War and Peace'")); 

Comments

1

Another option is phpDataMapper, which is a lightweight implementation of the DataMapper pattern.

Comments

0

And for more ORM http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software

Comments

0

I think one of best and simple ORM that uses PDO for php is
Redbeanphp :http://www.redbeanphp.com/

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.