posted 16 years ago
HI,
i have two tables 1.dept and 2. emp
i am using 1-many association to retrieve the data.
assume hql: select * from dept where deptno=10;
when i run this hql query
assume: i am getting 1 row of dept data and
associated 5 rows of emp data.
Now i am removing 2 rows from emp list.And assigning the emp list to dept
like:
Dept dept = new Dept();
dept.setEmpList(empList)//after removing 2 rows.
sesion.save(dept);
After if i save dept, the removed employees are still in db.
How to delete these employees from database.
Thanks,
siRaj