Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Bakir Farooq   on Jul 24 In Java Category.

  
Question Answered By: Norman Ray   on Jul 24

Simple example of delete  HQL is below :

Session session = HibernateUtil.currentSession();

String hql  = "delete from Product where name = :name";
 query  query = session.createQuery(hql);
query.setString("name","Product 1");
int rowCount = query.executeUpdate();
System.out.println("Rows affected: " + rowCount);

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Bulk Delete Or get search suggestion and latest updates.


Tagged: