Relationships

Using hibernate, if we want to have relationship between two entities, there must exist a foreign key relationship between the tables, we call it as Referential integrity. The main advantage of having relationship between objects is, we can do operation on one object, and the same operation can transfer onto the other object in the database.

Here are the four types of relationships we can have between objects in Hibernate.

Visit the following links for more information: