Loading
Mapping inheritance

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Mapping inheritance ? Or How to create a "Subclass" in hibernate ?


Ans)

Hibernate supports the three types of  inheritance:
 

o Table per Class Strategy: the <union-class> element in Hibernate
o Single Table per Class Hierarchy Strategy: the <subclass> element in Hibernate
o Joined Subclass Strategy: the <joined-subclass> element in Hibernate
 

The chosen strategy is declared at the class level of the top level entity in the
hierarchy using the @Inheritance annotation.

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class Flight implements Serializable { ... }



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Mapping inheritance


Mapping inheritance

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free