8 ms·
The fact that Hibernate Query Language even exists tells you that ORM is a bad idea.
by yessql 12y ago
The fact that Hibernate Query Language even exists tells you that ORM is a bad idea.
- threeseed 12y agoThat makes absolutely no sense. The whole point of ORM is that it is database agnostic. Given how different databases twist the SQL standard and provide a whole raft of proprietary extensions you need an abstracted query layer. Whether you give it a name like HQL or don't there will always be some layer.
- tokenrove 12y agoSure, but one can have an "ARM" (Abstract Relational Model) that abstracts away from database-specifics without trying to shoehorn the relational model into an object model, which isn't a one-to-one mapping. It doesn't have to be an ORM.
- akmiller 12y agoI hope that's not the whole point of an ORM given how pervasive they seem to be in every project and how few any given projects ever switch their backend out. Choosing an ORM because it abstracts you away from the storage engine seems like a terrible reason. I agree with Conery, choose the components that will compose your application wisely and then embrace those choices and use them to their fullest.
- derefr 12y agoCouldn't the abstracted query layer... be SQL? You don't need to speak it to the server; you can parse it at the client-library level and send whatever optimized thing the server likes to it.
- spacemanmatt 12y agoI think the basic underlying issue is some developers just don't want to understand data. The rest are cascade effects.