FAQ

General

Q. Why another ORM/DAO package?

A. The overview explains it all. See also the next Q&A.

Q. Have you looked at Propel, DBDO, etc?

A. Yes, we are aware of these ORM/DAO packages and have tried some of them. As explained in overview/motivation, we think EZPDO fits our needes better and hope it also brings some benefits to the community.

IMHO, from a user’s perspective, the goodness of a software package has many aspects. Ease of use, performance, design, documentation, coding style, support… Just to name a few. We believe that debating which package is better simply by “talking” (constructive comments an exception) does not make any software better. Let’s do more testing, benchmarking, profiling and thinking, and let the users make the final call.

Q. What license does EZPDO use?

A. EZPDO uses the very liberal BSD licence.

Q. Which databases are supported?

A. EZPDO talks to databases through DBAL’s (Database Abstraction Libraries). Currently it supports ADOdb, PEAR DB and PDO (beta). So it is safe to say that any database supported by these libraries should be supported by EZPDO. (See this for more details.)

Q. What's the relationship between EZPDO and PDO?

A. Please do not confuse EZPDO with PDO. PDO, which will become a built-in extension in PHP 5.1, “defines a lightweight, consistent interface for accessing databases in PHP”, is indeed a DBAL (Database Abstraction Library). EZPDO currently has beta support for PDO.

Q. What's planned?

A. See developer guide.

Using EZPDO

Q. How to make @orm recognizable by phpDocumentor?

A. Two choices:

  • If you prefer command line to kick off phpDocumentor, insert “-ct orm” in your command.
  • If you use a phpDocumentor .ini file to document your PHP code, add the following in your .ini file to make @orm a custom tag,
customtags = orm

Or if you already have some custom tags defined, simply append “,orm” (You need the comma as the seperator).

Q. Can I use ADODb_Lite instead of ADODb?

A. Yes, it’s really simple. See this forum post.

Q. What happens when loading an object that has many associated objects?

A. Someone asked, “In case you have an Author who wrote 1000 books. Will all 1000 books be loaded into memory?” The answer is a flat NO! EZPDO is mindful of memory consumptions and uses the lazy loading strategy. When you first read the object, only those object IDs (integers) of the associated objects are loaded into memory. The full-blown objects will be loaded only when you try to access them.

Q. How to get the internal Object ID (OID) for an object?

A. Simple. Say $o is the object created by the persistence manager (epManager),

$o->oid

or

$o['oid']

5 user comments

  1. dobes on December 17th, 2006:

    Can EZPDO update my schema automatically when I change my class definitions - will it do an ALTER TABLE or do I have to do that myself?

  2. Frank Topel on April 1st, 2007:

    How can I make use of private and protected attributes in classes?

  3. naholyr on June 18th, 2007:

    @dobes :
    No, it does not handle the schema migrations. There are some tricks, i personnaly use a code-generator which converts all my stored data to PHP ezpdo-instructions. It’s not so clean, but i don’t have another idea to provide this : http://www.ezpdo.net/forum/viewtopic.php?pid=2417#p2417

    @Frank Topel:
    If you have private/protected attributes in your class, you MUST provide getter AND setter. Given that, you can simply use this patch : http://www.ezpdo.net/forum/viewtopic.php?pid=2432#p2432

  4. ezpdo4php on June 22nd, 2007:

    @Frank, this has been supported now. Please see this post.

  5. Drwho on June 23rd, 2007:

    Does EZPDO have a tool to automaticly extract classes from an existing database? Like DB_DataObject?

    Thanks

    And your “Security code (from image above)” really sucks!. It is way too hard to make out the letters.

Post your comments

XHTML: tags you can use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Couldn't find your convert utility. Check that you have ImageMagick installed.