Home Hibernate XML Mapping for SelfJoin
 First of all I have to use XML mapping as I am not creating any POJO for my entities. I am using dynamic-map. So hibernate will create Maps to represent my entity(Every thing is same except that I am not specifying any POJO class name in my mapping). I have to store(in the create page) Employee details along with the employee's Manager. Now when I open the detail page of an Employee, I have to show all the subordinate under that particular employee(if they have any). Assume below is the table details empId empName managerId  Can some one kindly provide the hibernate mapping for the same. Also note that I prefer to have the subordinate association as read only. In the detail page I prefer to have the employ data retrieved like (JSON representation to define the object) {empId:123,empName:"Manager",managerId:"1", subordinates:[{empId:1000,empName:"sub1"},{empId:1001,empName:"sub2"}]}