How Hibernate Almost Ruined My Career
Frankly, I&#x27;ve never understood the real-world utility of ORMs such as Hibernate. As far as I can tell, their purpose is to &quot;abstract away&quot; a database. But why?<p>SQL isn&#x27;t hard. Learning database optimization is nontrivial but doable for anyone. Why do we need ORMs? Why is it better to replace a &quot;WHERE ...&quot; clause with &quot;.where(...)&quot;?<p>My personal impression is that these frameworks were developed for people that know how to write code in some language but don&#x27;t know how databases work and want something easy instead of learning how databases work. It really feels very lazy to me.<p>If you have a library or framework thatproperly prevents SQL injection attacks, why use an ORM unless you feel too lazy or scared to learn how to use a database properly?