- 3
- 0
- 约3.11千字
- 约 5页
- 2015-09-27 发布于重庆
- 举报
Hibernate表的对应关系
Hibernate表的对应关系
重点:多对多关系
难点:多对多关系
课程类型:理论
教学内容:
一、一对一的关系
?假设有2个表:person 和idcard
? 在person和idcard表的pojo 类里面分别设置另一个表的属性:private Person person;(Idcard类里面声明person类) private Idcard idcard (Person类里面声明)
?在配置文件中为如下表示:主表person:? one-to-one name=idcard class=com.guoc.vo.Idcard cascade=all???????/one-to-one
?副表idcard:副表的id根据外键即主表的idgenerator class=foreign???????? param name=propertyperson/param??????????? /generator
one-to-one name=person class=com.guoc.vo.Person??????? ?constrained=true
??????? /one-to-one
在操作的时候:Person person = new Person();??person.setPid(idcardForm.getString(pid));
ic.setPerso
您可能关注的文档
- Dynamics of FD networks the role of bound states.pdf
- Dynamics Of Hadronization From Nuclear Semi Inclusive Deep Inelastic Scattering.pdf
- Dynamics of interacting neural networks.pdf
- Dynamics of LongLiving Excitons in Tunable Potential Landscapes.pdf
- Dynamics of Nucleation in the Ising Model.pdf
- Dynamics of onedimensional Bose liquids Andreevlike reflection at Yjunctions and absence.pdf
- Dynamics of Open Bosonic Quantum Systems in Coherent State Representation.pdf
- Dynamics of strangeness production in the near threshold nucleonnucleon collisions.pdf
- Dynamics of the BornInfeld dyons.pdf
- Dynamics of TwoLevel System Interacting with Random Classical Field.pdf
- History of Theory and Analysis in Applied Linguistics.ppt
- HIV初筛实验室样品采集和处理程序.doc
- How Should Research Contribute to Instructional Improvement The Case of Lesson Study.pdf
- How it Works A Field Study of NonTechnical Users Interacting with an Intelligent System.pdf
- How to act as a good leader(蝇王分析).doc
- HPLC_ICP_MS在环境样品的痕量元素形态分析中的应用.pdf
- HPLC测定奶粉中三聚氰胺.doc
- HPLC法测定蒲黄中总黄酮的含量.pdf
- HR发展方向.doc
- HS—SPMEGCMS联用测定孟买蓝宝石金酒中的香气成分.pdf
原创力文档

文档评论(0)