Posts Tagged ‘hibernate’

Hibernate Annotations examples and reference

Found a really great reference with examples of Hibernate association mappings using annotations. http://tadtech.blogspot.com/2007/09/hibernate-association-mappings-in.html

Hibernate HQL like query using named parameters

Using the LIKE condition with a “%” sign for pattern matching in a HQL query with named parameters required some tweaking. This did not work: It resulted in a org.hibernate.QueryException: unexpected char: ‘%’ error. Next I tried using single quotes: Didn’t work either, an org.hibernate.QueryParameterException: could not locate named parameter. What actually worked was putting [...]