Hacker News new | ask | show | jobs
by olavgg 3972 days ago
Absolutely not! Heck with Hibernate for example you can't write a simple inner join on a non id value;

For example this query is invalid with HQL

SELECT p FROM person p INNER JOIN Invitation i ON i.email LIKE p.email

And that is one of MANY gotchas. Hibernate has it advantages though, especially when it comes to developer productivity. But JDBC is needed for some edge cases.

I often use Groovy SQL instead of using JDBC, comes with excellent transaction support and helps simplifying you DB specific code so it makes sense for newcomers too.