Skip to content
Browse files

documentation for new withNewSession method

  • Loading branch information...
1 parent 81f3dc3 commit d66317c90b6b7620aa78c0398f0ff56fbfef8e73 @graemerocher graemerocher committed
Showing with 20 additions and 0 deletions.
  1. +20 −0 grails-doc/src/ref/Domain Classes/withNewSession.gdoc
View
20 grails-doc/src/ref/Domain Classes/withNewSession.gdoc
@@ -0,0 +1,20 @@
+h1. withNewSession
+
+h2. Purpose
+
+Provides a way to execute code within the context of a completely new Hibernate session which shares the same transactional (JDBC Connection) resource as the currently bound session.
+
+h2. Examples
+
+{code:java}
+Book.withNewSession { org.hibernate.Session session ->
+ // do work
+}
+{code}
+
+h2. Description
+
+Parameters:
+
+* @closure@ - A closure the first argument to which is the @Session@ object
+

0 comments on commit d66317c

Please sign in to comment.
Something went wrong with that request. Please try again.