What is the HQL sattement to to delete an array of objects and not one by one. here is what i got in DAO and its an
n+1:
Code:
...
for (SkillableJob skillableJob : skillableJobs) {
Job job = skillableJob.getJob();
job.removeSkillableJob(skillableJob);
[u]getSession().delete(skillableJob);[/u]
}
...
works, but there should be something like this:
Code:
...
for (SkillableJob skillableJob : skillableJobs) {
Job job = skillableJob.getJob();
job.removeSkillableJob(skillableJob);
//getSession().delete(skillableJob);
}
Query q =
getSession().createQuery("delete SkillableJobSeeker j "
"where j in :list")
.serParameterList("list", skillableJobs);
...
preceding doesn't work. Unexpected token at line ... exception is thrown.