Change your query to this:
Query qry = session.createQuery("From RegistrationBean as rb where rb."+searchCriteria+" like ?");
qry.setString(0, "%"+searchField+"%");
More Related Contents:
- How do you do a limit query in JPQL or HQL?
- What is the difference between JOIN and JOIN FETCH when using JPA and Hibernate
- JPA and Hibernate – Criteria vs. JPQL or HQL
- Hibernate criteria: Joining table without a mapped association
- How can you call custom database functions with Hibernate?
- Hibernate Named Query Order By parameter
- Hibernate HQL Query : How to set a Collection as a named parameter of a Query?
- How to escape reserved words in Hibernate’s HQL
- IN-clause in HQL or Java Persistence Query Language
- HQL Hibernate INNER JOIN
- HQL left join of un-related entities
- HQL – row identifier for pagination
- No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode HQL
- Is there a more efficient way of making pagination in Hibernate than executing select and count queries?
- HQL recursion, how do I do this?
- Inserting data in one table using HQL in Hibernate
- What are the possible values of the Hibernate hbm2ddl.auto configuration and what do they do
- PersistentObjectException: detached entity passed to persist thrown by JPA and Hibernate
- Hibernate Error: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session
- Configure hibernate (using JPA) to store Y/N for type Boolean instead of 0/1
- Using Hibernate’s ScrollableResults to slowly read 90 million records
- How do we count rows using older versions of Hibernate (~2009)?
- How can I get the session object if I have the entity-manager?
- Using javafx.beans properties in model classes
- Hibernate could not fetch the SequenceInformation from the database
- Hibernate: Where do insertable = false, updatable = false belong in composite primary key constellations involving foreign keys?
- How to set the timeout period on a JPA EntityManager query
- When to use DiscriminatorValue annotation in hibernate
- Unsuccessful: alter table XXX drop constraint YYY in Hibernate/JPA/HSQLDB standalone
- How to use JTA support in Tomcat 6 for Hibernate?