我可以配置Hibernate在实际插入之前不要将select seq.nextval作为单独的调用吗?
org.hibernate.jdbc.AbstractBatcher about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
org.hibernate.SQL select SEQUENCE_1.nextval from dual
org.hibernate.id.SequenceGenerator auditor50 - Sequence identifier generated: 122797
org.hibernate.jdbc.AbstractBatcher auditor50 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
<class..>
<id column="ID" name="id" type="long">
<generator class="sequence">
<param name="sequence">SEQUENCE_1</param>
</generator>
</id>
</class>
答案 0 :(得分:1)
我不认为这是可能的。但我不知道它会有什么不同。如果您出于性能原因而想这样做: