Skip to content

Instantly share code, notes, and snippets.

@yusufcakmak
Created August 4, 2015 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yusufcakmak/182b31aaa9eaa32f1d19 to your computer and use it in GitHub Desktop.
Save yusufcakmak/182b31aaa9eaa32f1d19 to your computer and use it in GitHub Desktop.
public void deleteBook(Book book) {
Session session = HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
session.delete(book);
session.getTransaction().commit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment