官术网_书友最值得收藏!

  • EJB 3 Developer Guide
  • Michael Sikora
  • 115字
  • 2021-07-02 11:34:57

Summary

Entities do not exist in isolation but are usually associated with other entities. This chapter examined how we map these associations onto a relational database. We first looked at an example with unidirectional one-to-one, one-to-many, and many-to-many associations. We described the @OneToOne, @OneToMany and @ManyToMany annotations for mapping associations to a relational database. Initially we relied on default object/relational mapping values.

We then described a bidirectional example and showed how we could override default object/relational mapping values.

We described eager and lazy loading mechanisms. We gave examples of the @Embedded, @Embeddable, @Enumerated and @MapKey annotations. We saw how to handle composite primary keys.

Finally we looked at a number of object/relational inheritance mapping strategies.

主站蜘蛛池模板: 东辽县| 临沂市| 肇东市| 扎兰屯市| 同江市| 汉川市| 鱼台县| 吐鲁番市| 乐昌市| 抚州市| 清镇市| 红安县| 涪陵区| 伊吾县| 开阳县| 锡林浩特市| 南涧| 神农架林区| 山西省| 岑溪市| 突泉县| 汝阳县| 赣榆县| 贵港市| 山阳县| 盐池县| 会东县| 资中县| 盐亭县| 南投市| 香格里拉县| 黔东| 文化| 青海省| 右玉县| 昌都县| 西峡县| 贵定县| 封丘县| 梨树县| 江口县|