posted 10 years ago
Hi I am implementing JPA hibernate simple application using one to many relationship.
Relation ship is Comapny (1)----------- Department(*)
Company.java is as follow :
Department.java is as follow :
CompanyDAO.java is follow
HibernateUtil.java
What I am doing is , I am adding new department to existing company. After execution above code
Table created are :
1. Company table with id and name
2. Department table with deptId , deptName , compId.
so at the time adding department , it does not threw any exception but updates records in department as
1(Id),Development(DeptName),null(compId) .
I am not getting why it is not updating compId column. Please help.