[ Content | Sidebar ]

Posts tagged Hibernate

SQL Injection is just bad coding

Rajesh Patel brought once again to my attention the fact that many developers assume an ORM framework protects you from SQL injection. SQL or HQL or whatever injection, is just exploiting a bug whose source is String concatenation. It has nothing to do with which tool you use to get, store, delete or update data [...]

Hibernate: scrolling through entities with join fetched child collections

While this should be a trivial thing, only consisting of mapping your entity and requesting a ScrollableResults from a Query object, it recently proved quite harder for me and my colleagues. The symptoms you may see if ever using this approach are very confusing: child collections will most of the time have only one entity, [...]