hibernate原理与应用.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
hibernate原理与应用

Increment hibernate管理 Identity msSql mySql 自增 Sequence oracle Hilo 高地位 需要建立表(默认hibernate_unique_key 字段名next_hi) Seqhilo Uuid 128uuid算法(ip 时间 计数器)32位字符串 Guid Native assigned * * 4 * * * * * * * * * 3 * * * 2 * * * * * * * * * * * * * * * * 3 * * * * * 3 * * * * * 继承映射 混合使用“一个类继承体系一张表”和“每个子类一张表” (映射文件) class name=Employee table=employee id name=id generator class=native/ /id discriminator column=type/ property name=name/ subclass name=Skiller property name=net/ /subclass subclass name=”Sales” join table=sales key column=employee_id/ property name=sell/ /join /subclass /class 继承映射 每个具体类一张表(union-subclass) (表结构) 继承映射 每个具体类一张表(union-subclass) (映射文件) class name=Employee abstract=true id name=id generator class=hilo/ /id property name=name/ union-subclass name=Skiller table=skiller property name=skill/ /union-subclass union-subclass name=Sales table=sales property name=sell/ /union-subclass /class 主健不能是identity类型,如果父类是abstract=”true”就不会有表与之对应。 隐式多态,映射文件没有联系,限制比较多很少使用。 集合映射 集合映射(set, list, array,bag, map) set name=”employees” key column=”depart_id”/ one-to-many class=”Employee”/ !-- element type=string column=name/ -- !-- composite-element class=”YourClass” property name=”prop1”/ property name=”prop2”/ /composite -- /set 集合映射 集合映射(set, list, array,bag, map) list name=”employees” key column=”depart_id”/ !—表中有单独的整型列表示list-index ? list-index column=”order_column”/ one-to-many class=”Employee”/ /list array name=”employees” key column=”depart_id”/ !—表中有单独的整型列表示list-index ? list-index column=”order_column”/ one-to-many class=”Employee”/ /array 集合映射 集合映射(set, list, array,bag, map) bag name=employees order-by=id desc key column=”depart_id”/ one-to-many class=”Employee”/ /bag map name=employees key column=”depart_id”/ map-key type=string column=name/ one-to-many class=”Employee”/ /map 集合映射 集合映射(set, list, array,bag, map) 这些集合类都是Hibernate实现的类

文档评论(0)

75986597 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档