Relative Content

Tag Archive for javamysqlspringhibernatehql

How to combine firstname,middlename,lasname with null case in HQL search query

In my application I’ve saved staff name as first name, middle name & last name separately on the database. So if the user enters the full name or part of the name to search the staff, it should search first name, middle name & last name combinedly. One of the main problem here to address is that some staff only have first and last name and some others have both first, middle, last name and also some only have the first name. How to write a hql query here to sort this situation.

HQL : how to combine firstname,middlename,lasname with null case in hql search query

In my application I’ve saved staff name as first name, middle name & last name separately on the database. So if the user enters the full name or part of the name to search the staff, it should search first name, middle name & last name combinedly. One of the main problem here to address is that some staff only have first and last name and some others have both first, middle, last name and also some only have the first name. How to write a hql query here to sort this situation.