请教?hibernate.cfg.xml 配置问题

juyuquan1986 juyuquan1986 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
请教下

<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>
上面的配置文件中 主键必须有序列吗?有没有没有序列的时候,没有序列的情况下如何写配置文件?
...全文

相关推荐

评论 17
收藏 已收藏
分享
返回顶部
juyuquan1986
Web 开发 81,108 成员 341,721 内容