Register / Login
Win a copy of
The Java Performance Companion
this week in the
Object Relational Mapping
Select query with multiple where clause
posted 3 years ago
I have two tables with device and transaction
Device Id of device is the foreign key of transaction
how write hql query Device Id not used in second table
My current hql query for device is
String fromClause = "select device from Device device where "+searchCritiria1+" like"+"'%"+searchString1+"%' and "+searchCritiria2+" like"+"'%"+searchString2'"; Query query = getSession().createQuery(fromClause);
here searchCritiria1,searchCritiria2 column name and searchString1,searchString2 are parameters passed from UI
how i added these sql query to
where Device ID not in (select deviceID from transaction)
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
Deleting Record in a Web Application.
HQL help needed
Help with HQL Insert and Joins using Hibernate 3 / JPA
Stored Procedure inside HQL query?
HQL query for multiple conditions met