Hello,
on 04/05/2005 11:58 AM Hendy Irawan said the following:
Would anyone be kind enough to provide me some pointers about object relationship mapping [libraries] in PHP?
All I know is there are some DB APIs available: PEAR DB, MDB, ADOdb, Creole... I currently use MDB for its excellent DB schema management capabilities. And I use ORM manually, this provides the most flexbility but from time to time it gets rather annoying, so I'm now seeking alternatives (if possible, still using MDB, but a switch to other API is okay though...)
Each API seem to have its own relational-to-OO mapping in form of data objects... like PEAR DB DataObject, which I would say is an almost-ORM implementation. Creole's Propel seems to be a bit more advanced than the others. What I wanted is more like Java's Hibernate. So it's not just a wrapper for get() but it actually creates proper OO classes in PHP based on some meta-information. I don't mind code generation if its flexible enough and it's directly usable for all circumstances without handly modifying them (since they'll get regenerated from time to time).
It seems that what you want is something like Metastorage.
It generates ORM classes from a XML meta-information definition of your classes, variables, relationships, and functions that you need to manipulate your objects.
Metastorage is not a framework, but rather a full blown generator tool that generates compact classes with only the code that you need (no fat base classes nor code that may never be used).
It can also generate compiled queries from an OQL expression and a special class to install or upgrade that database schema to store the persistent objects.
http://www.meta-language.net/metastorage.html
--
Regards, Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php