What is the easiest to use ORM framework for PHP?
I use a little known orm layer called redbean. you can find it here : http://www.redbeanphp.com. its absolutely unique in the sense that it just creates tables columns and indexes all by itself without any configuration files at all. I find it to be a huge timesaver!
Both CodeIgniter (http://codeigniter.com/user_guide/database/active_record.html) and its PHP5 only fork Kohana (http://docs.kohanaphp.com/libraries/orm) contain implementations of the ActiveRecord pattern.
I'm a big fan of Doctrine which is a full featured ORM that will be replacing Propel as Symfony's default ORM.
It's got your basic ORM stuff you'd expect along with a full featured query builder that I've found to be wonderful.
It comes with a full suite of command line tools to manage your databases. For example, you can create your schemas and fixtures in YAML, have Doctrine generate classes based on your Schema, create the database, create the schema based on the models, then populate the database with your fixtures all with a single ./doctrine build-all-reload
.
It also includes support for database migrations and recently updated the migrations to automatically diff and generate your migration models.
As per your doctrine complaints, you can run a command ./doctrine generate-models-db
or ./doctrine generate-yaml-db
to automatically create models and yaml files respectively from your current database setup.
Other niceties include "Behaviors" which makes life much easier when implementing certain, well, behaviors in your schema. For example you can add the "Timestampable" behavior to your class file. Doctine automatically adds a 'created_at' and 'updated_at' column, populates them, and every $object->save()
you run automatically updates the 'updated_at' column. More complex behaviors include i18n, table versioning, and trees (though really only NestedSet).
Personally I've been extremely enamored with Doctrine and rave about it every chance I get.