<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.example.entity">
<class name="Foo">
<id name="id">
<generator class="org.hibernate.id.enhanced.SequenceStyleGenerator">
<!--初始值,默认是1-->
<param name="initial_value">1000</param>
<!--自增大小,默认是1-->
<param name="increment_siz">1</param>
<!--sequence的名字,默认是"hibernate_sequence"-->
<param name="sequence_name">hibernate_sequence</param>
</generator>
</id>
</class>
</hibernate-mapping>
Hibernate配置自动增长咧
最新推荐文章于 2023-12-07 17:14:28 发布