", IN (a.checkupTypes) as ch WHERE ch.id = :checkupType";
Query query = manager.createQuery(sql);
query.setParameter("checkupType", checkupType.getId());
Iterator i = query.getResultList().iterator();
while(i.hasNext()) {
Laboratory lab = (Laboratory) i.next();
lab.getCheckupTypes().remove(checkupType);
manager.merge(lab);
}
} catch (Exception ex) {
throw new ClipsServerException("Попытка удаления лабораторий не удалась: ", ex);
}