(Quick Reference)

withSession

Purpose

Provides access to the underlying Hibernate Session object

Examples

Book.withSession { org.hibernate.Session session ->
    session.clear()
}

Description

Parameters:

  • closure - A closure the first argument to which is the Session object