Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
Mysql
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
I have a method that lookes like this :
session = Factory.getSession(callContext);
final List result = new ArrayList();
try {
final EducationTypeBean educationTypeBean = (EducationTypeBean) session.get(EducationTypeBean.class, educationTypeID);
if (educationTypeBean == null) {
throw new ObjectNotFoundException("errors.educationtype.not.found", new String[] { educationTypeID.toString() });
}
CourseBean courseBean = null;
for (Iterator courses = educationTypeBean.getCourses().iterator(); courses.hasNext();) {
courseBean = (CourseBean) courses.next();
Long goalId = courseBean.getCourseCategoryBean().getGoalDescriptionBean().getId();
if (goalId.equals(goalDescriptionID)) {
result.add(courseBean);
}
}
session.flush();
}
catch (HibernateException e) {
log.error("", e);
throw new SystemException(e);
}
return result;
I make use of an interceptor, but I can't figure out why the onFlushDirty method is called....