Hacker News new | ask | show | jobs
by stefs 5713 days ago
it's always possible to bypass whatever ORM you use by using plain PDO/SQL, but then all the features an ORM provides are lost.

but mixing ORMs with custom SQL would be a challenge, because the results couldn't be mapped to relational tables anymore.

by the way, you can reuse dumbledORMs PDO-instance - $conn = Db::pdo() - and even the query method (preparing, executing and fetching) is public too.

i didn't look into the hydrate method, but it seems it is possible to map results from custom queries to ORM objects.