MANY-TO-MANY MAPPING
May 12, 2011 Implemented using a Set java collection Mediator table is mandatory – Join table Join table contains foreign key only
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; }
May 12, 2011 Student.hbm.xml This class contains the certificate records.
May 12, 2011 CREATE CONFIGURATION FILE Hibernate.cfg.xml Map the Student. hbm.xml and Course.hbm.xml files in the configuration file
Thank You