title: getGeneratedKeys() support is not enabled error in Hibernate 5.0.0.CR2
body: <p>I'm trying to connect to Oracle and I'm getting this error in Hibernate-5.0 even though I have enabled this property in configuration.</p>
  
  <pre><code>&gt; Aug 10, 2015 8:49:34 AM org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl useContextualLobCreation
  INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
  Aug 10, 2015 8:49:35 AM org.hibernate.AssertionFailure &lt;init&gt;
  ERROR: HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: getGeneratedKeys() support is not enabled
  Exception in thread "main" org.hibernate.AssertionFailure: getGeneratedKeys() support is not enabled
      at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.checkAutoGeneratedKeysSupportEnabled(StatementPreparerImpl.java:94)
      at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:113)
      at org.hibernate.id.SequenceIdentityGenerator$Delegate.prepare(SequenceIdentityGenerator.java:93)
  </code></pre>
  
  <p>My hibernate.cfg.xml is as below.</p>
  
  <pre><code>&lt;hibernate-configuration&gt;
  &lt;session-factory&gt;
      &lt;property name="hibernate.connection.driver_class"&gt;oracle.jdbc.driver.OracleDriver&lt;/property&gt;
      &lt;property name="hibernate.connection.password"&gt;*****&lt;/property&gt;
      &lt;property name="hibernate.connection.url"&gt;jdbc:oracle:thin:@*****&lt;/property&gt;
      &lt;property name="hibernate.connection.username"&gt;*****&lt;/property&gt;
      &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt;
      &lt;property name="hibernate.jdbc.use_get_generated_keys"&gt;true&lt;/property&gt;
  
      &lt;property name="show_sql"&gt;true&lt;/property&gt;
      &lt;property name="connection.pool_size"&gt;1&lt;/property&gt;
      &lt;!-- List of XML mapping files --&gt;
      &lt;mapping resource="mapping/Employee.hbm.xml" /&gt;
  &lt;/session-factory&gt;
  </code></pre>
  
  <p></p>
  
  <p>And Employee.hbm.xml is like below</p>
  
  <pre><code>&lt;hibernate-mapping&gt;
  &lt;class name="domain.Employee" table="EMPLOYEE"&gt;
      &lt;id name="id" type="integer" column="id"&gt;
          &lt;generator class="sequence-identity"&gt;
              &lt;param name="sequence"&gt;EMP_SEQ&lt;/param&gt;
          &lt;/generator&gt;
      &lt;/id&gt;
      &lt;property name="firstName" column="first_name" type="string" /&gt;
      &lt;property name="lastName" column="last_name" type="string" /&gt;
      &lt;property name="salary" column="salary" type="integer" /&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have tried many times but not seem to resolve. Where I'm going wrong here? Any pointers is a great help. Thanks in advance.</p>