Hopefully this is an easy question. I have a function that just does a find(), like this:
Code:
List employerResults = getHibernateTemplate().find("from EmployerInfo where upper(name) like upper(?)", searchString);
return employerResults;
But my output shows that database updates are happening, like this:
Code:
Hibernate: select employerin0_.employer_id as employer1_0_, employerin0_.employer_name as employer2_0_, employerin0_.employer_password as employer3_0_, employerin0_.jpu_jobp_user_id as jpu4_0_ from general.zjp_employers employerin0_ where upper(employerin0_.employer_name) like upper(?)
Hibernate: select contactpoi0_.emp_employer_id as emp3_1_, contactpoi0_.contact_point_id as contact1_1_, contactpoi0_.contact_point_id as contact1_7_0_, contactpoi0_.contact_point as contact2_7_0_, contactpoi0_.emp_employer_id as emp3_7_0_, contactpoi0_.ctp_contact_type_id as ctp4_7_0_ from general.zjp_contact_points contactpoi0_ where contactpoi0_.emp_employer_id=?
Hibernate: select contactpoi0_.emp_employer_id as emp3_1_, contactpoi0_.contact_point_id as contact1_1_, contactpoi0_.contact_point_id as contact1_7_0_, contactpoi0_.contact_point as contact2_7_0_, contactpoi0_.emp_employer_id as emp3_7_0_, contactpoi0_.ctp_contact_type_id as ctp4_7_0_ from general.zjp_contact_points contactpoi0_ where contactpoi0_.emp_employer_id=?
Hibernate: select contactpoi0_.contact_type_id as contact1_8_0_, contactpoi0_.contact_type as contact2_8_0_ from general.zjp_contact_types contactpoi0_ where contactpoi0_.contact_type_id=?
Hibernate: update general.zjp_contact_points set emp_employer_id=null where emp_employer_id=?
Hibernate: update general.zjp_contact_points set emp_employer_id=null where emp_employer_id=?
Hibernate: update general.zjp_contact_points set emp_employer_id=? where contact_point_id=?
Hibernate: update general.zjp_contact_points set emp_employer_id=? where contact_point_id=?
Hibernate: update general.zjp_contact_points set emp_employer_id=? where contact_point_id=?
Hibernate: update general.zjp_contact_points set emp_employer_id=? where contact_point_id=?
Why is a find() causing updates, and how can I stop that?