If you are using Grail's
Framework, it's simple to resolve lazy initialization exception by using Lazy
keyword on specific field in Domain Class.
For-example:
class Book {
static belongsTo = [author: Author]
static mapping = {
author lazy: false
}
}
Find further information here