Presentation is loading. Please wait.

Presentation is loading. Please wait.

MANY-TO-MANY MAPPING. May 12, 2011  Implemented using a Set java collection  Mediator table is mandatory – Join table  Join table contains foreign.

Similar presentations


Presentation on theme: "MANY-TO-MANY MAPPING. May 12, 2011  Implemented using a Set java collection  Mediator table is mandatory – Join table  Join table contains foreign."— Presentation transcript:

1 MANY-TO-MANY MAPPING

2 May 12, 2011  Implemented using a Set java collection  Mediator table is mandatory – Join table  Join table contains foreign key only

3 May 12, 2011 Pojo class public class Student { private int id; private String firstName; private String lastName; private Set courses; public Student() {} public Employee(String fname, String lname, int salary) { this.firstName = fname; this.lastName = lname; }

4 May 12, 2011 Student.hbm.xml This class contains the certificate records.

5 May 12, 2011 CREATE CONFIGURATION FILE Hibernate.cfg.xml Map the Student. hbm.xml and Course.hbm.xml files in the configuration file

6 Thank You


Download ppt "MANY-TO-MANY MAPPING. May 12, 2011  Implemented using a Set java collection  Mediator table is mandatory – Join table  Join table contains foreign."

Similar presentations


Ads by Google