title: Grails sequence generation for Oracle 11g
body: <p>I realize this is more of a hibernate question than Grails. In a load balanced (2 nodes) environment I see that the ids of my objects are jumping around quite a bit. Even without restarting the app server I see that the numbers skip 10 sometimes 20 numbers. I suspect the hibernate session is caching a block of sequence values. <strong>Is there a way to control this behavior with grails 1.3.7 ?</strong> Essentially I am OK with server pulling nextval from DB every time it needs one.</p>
  
  <p>My domain object sequence declaration (same for 2 objects):</p>
  
  <pre><code>static mapping = {
          id generator:'sequence', params:[sequence:'MY_SEQ']  
      } 
  </code></pre>