(Quick Reference)

withSession

Purpose

Provides access to the underlying Hibernate Session object

Examples

Book.withSession { session ->
    session.clear()
}

Description

Parameters:

  • closure - A closure which accepts a Session argument