Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nothing prevents you from using raw SQL queries with Hibernate. HQL is just a convenient superset.


Actually mixing raw queries with JPQL/Hibernate queries is the worst of all worlds. To get it right, you will end up making explicit calls to let the EntityManager know what you want each side to be doing to play nice.


I've seen that a lot in the past 10 years, and I don't find it particularly problematic.

Often the fucked up native query end up in a different type of DAO for performance / concurency reasons anyway.

Don't get me wrong, I dislike JPA and Hibernate really much, but that particular aspect has often been one of the less painful to deal with.


I've never hit such a bug. Can you expand on what (and when) added complexity would a raw query have versus a raw query without hibernate?


It's not a bug, it's by design.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: