PEAR::DB_DataObject
One of the PEAR modules I’ve been making extensive use of is DB_DataObject. For a while I toyed with writing a custom DataObject system for the current project, but PEAR’s offering seemed to have pretty much everything I was looking for. Overall, it’s made the development process much more straightforward than it would otherwise have been, but I did run into one unexpected problem. I have a lot of table links specified in the configuration file and I suddenly discovered that some of those links weren’t being made as I expected. It turns out that DataObject loads all the links into an associative array, indexed by the field being linked. This means that if, say, you have a member id linking to a whole variety of tables then only the last link specified will be recorded. ...