Перейти к содержимому

Hibernate Table Per Heirarchy class Inheritance mapping theory Tutorial 22

TubeAcademy

0:00 / 0:00

Hibernate Table Per Heirarchy class Inheritance mapping theory Tutorial 22

291 просмотр · 9 лет назад
TubeAcademy
45 подписчиков
291 просмотр · 9 лет назад
Hibernate tutorial By Maniram Yadav Hibernate configuration file hibernate.cfg.xml TubeAcademy Hibernate Inheritance maping By this inheritance strategy, we can map the whole hierarchy by single table only. Here, an extra column (also known as discriminator column) is created in the table to identify the class. In case of table per class hierarchy an discriminator column is added by the hibernate framework that specifies the type of the record. It is mainly used to distinguish the record. To specify this, discriminator subelement of class must be specified. The subclass subelement of class, specifies the subclass. In this case, Regular_Employee and Contract_Employee are the subclasses of Employee class. For more detailed explanation watch the video Inheritance mapping in hibernate framework is technique for mapping the inherited classes in the databases in proper way using some of the hibernate rule in xml or using the annotation in class file. join column mapping in hibernate Entity bean @Table Annotation @Id Annotation @Column annotation Tutorial By Maniram Yadav Hibernate Introduction Object Relational Mapping ORM Tutorial By Maniram Yadav Java Tutorial Java programming HQL Hibernate Basics RDBMS