Monday, November 21, 2011

Grails subflows and LazyInitializationException no session bound

When passing objects between the parent flow and subflow I would use the 'conversation' scope. However, any domain objects loaded from the database during the subflow, would later have it's hibernate session dettached when reused in the parent flow.

To workaround this problem, I've reloaded the objects using their ID values in the parent flow to ensure they are associated with a hibernate session


Reference: http://jira.grails.org/browse/GRAILS-2518

No comments:

Post a Comment