请教?hibernate.cfg.xml 配置问题
请教下
<hibernate-mapping>
<class name="com.song.shopping.entity.User" table="SHOPPING_SONG_USER" schema="OPENLAB">
<id name="userId" type="long">
<column name="USER_ID" precision="22" scale="0" />
<generator class="hilo" />
</id>
<property name="username" type="string">
<column name="USERNAME" length="32" not-null="true" unique="true" />
</property>
<property name="userpwd" type="string">
<column name="USERPWD" length="32" not-null="true" />
</property>
<property name="useremail" type="string">
<column name="USEREMAIL" length="64" not-null="true" />
</property>
<property name="telphone" type="string">
<column name="TELPHONE" length="20" />
</property>
<set name="shoppingSongOrders" inverse="true">
<key>
<column name="USER_ID" precision="22" scale="0" not-null="true" />
</key>
<one-to-many class="com.song.shopping.entity.Order" />
</set>
</class>
</hibernate-mapping>
<id name="userId" type="long">
<column name="USER_ID" precision="22" scale="0" />
<generator class="hilo" />
</id>
上面的配置文件中 主键必须有序列吗?有没有没有序列的时候,没有序列的情况下如何写配置文件?