This is exactly what my xPDO project is about, though I take it step further to include forward and reverse engineering of database schemas, as well as auto API generation for all CRUD and foreign key relationship operations, automatic table-generation, and more. With it you can literally turn any MySQL structure into a light-weight, PHP 4 and 5 compatible OO API in a matter of minutes, and it works fine when used within the current MODx.
)