I just came back to this problem since i had something more prioritary to deal with. Anyway.
Just enabled the debug mode + Hibernate SQL logs.
I found out that the update operations are laucnhed upon queryObject.list() method in the following code (this code is in RegularityFormDaoBase, RegularityForm being the entity. It is an AndroMDA-generated base class, i based upon this to implement business methods)
Code:
public java.lang.Object findByEffectiveTranche(final int transform, final java.lang.String queryString, final com.thalys.opalys.domain.EffectiveTranche effectiveTranche)
{
try
{
org.hibernate.Query queryObject = super.getSession(false).createQuery(queryString);
queryObject.setParameter("effectiveTranche", effectiveTranche);
java.util.Set results = new java.util.LinkedHashSet(queryObject.list());
java.lang.Object result = null;
if (results != null)
{
if (results.size() > 1)
{
throw new org.springframework.dao.InvalidDataAccessResourceUsageException(
"More than one instance of 'com.thalys.opalys.domain.RegularityForm"
+ "' was found when executing query --> '" + queryString + "'");
}
else if (results.size() == 1)
{
result = results.iterator().next();
}
}
result = transformEntity(transform, (com.thalys.opalys.domain.RegularityForm)result);
return result;
}
catch (org.hibernate.HibernateException ex)
{
throw super.convertHibernateAccessException(ex);
}
}
Before passing by this line i have this last two log lines:
Code:
13:40:30,563 INFO [STDOUT] Hibernate: select effectivep0_.EFFECTIVE_TRANCHE_FK as EFFECTIVE26_1_, effectivep0_.ID as ID1_, effectivep0_.ID as ID14_0_, effectivep0_.PASSAGE_EFFECTIVE as PASSAGE2_14_0_, effectivep0_.THEORETICAL_COMPOSITION as THEORETI3_14_0_, effectivep0_.EFFECTIVE_COMPOSITION as EFFECTIVE4_14_0_, effectivep0_.THEORETICAL_DATE as THEORETI5_14_0_, effectivep0_.EFFECTIVE_DATE as EFFECTIVE6_14_0_, effectivep0_.PASSENGERS_UP_FIRST_CLASS as PASSENGERS7_14_0_, effectivep0_.PASSENGERS_UP_SECOND_CLASS as PASSENGERS8_14_0_, effectivep0_.PASSENGERS_DOWN_FIRST_CLASS as PASSENGERS9_14_0_, effectivep0_.PASSENGERS_DOWN_SECOND_CLASS as PASSENGERS10_14_0_, effectivep0_.PASSENGERS_STILL_FIRST_CLASS as PASSENGERS11_14_0_, effectivep0_.PASSENGERS_STILL_SECOND_CLASS as PASSENGERS12_14_0_, effectivep0_.DELAY as DELAY14_0_, effectivep0_.COMMERCIAL_INCIDENT_DESCRIPTIO as COMMERCIAL14_14_0_, effectivep0_.IS_COMPENSABLE as IS15_14_0_, effectivep0_.IS_EXTERNAL_FACTOR as IS16_14_0_, effectivep0_.COMPENSATION_PERCENTAGE as COMPENS17_14_0_, effectivep0_.TOTAL_IMPUTATION as TOTAL18_14_0_, effectivep0_.END_OF_MISSION_INFO_PRESENT as END19_14_0_, effectivep0_.STATION_TYPE as STATION20_14_0_, effectivep0_.POINT_FK as POINT21_14_0_, effectivep0_.THEORETICAL_LINKED_TRANCHE_FK as THEORET22_14_0_, effectivep0_.TRAIN_SET_FK as TRAIN23_14_0_, effectivep0_.EFFECTIVE_LINKED_TRANCHE_FK as EFFECTIVE24_14_0_, effectivep0_.COMMERCIAL_INCIDENT_TYPE_FK as COMMERCIAL25_14_0_ from EFFECTIVE_PASSAGE effectivep0_ where effectivep0_.EFFECTIVE_TRANCHE_FK=? order by effectivep0_.EFFECTIVE_TRANCHE_FK
13:40:30,567 INFO [STDOUT] Hibernate: select incidentef0_.AFFECTED_TRANCHE_FK as AFFECTED8_1_, incidentef0_.ID as ID1_, incidentef0_.ID as ID22_0_, incidentef0_.DELAY as DELAY22_0_, incidentef0_.COMMENTS as COMMENTS22_0_, incidentef0_.TYPE as TYPE22_0_, incidentef0_.DATE as DATE22_0_, incidentef0_.INCIDENT_EFFECT_LINK as INCIDENT6_22_0_, incidentef0_.TRIGGERING_INCIDENT_FK as TRIGGERING7_22_0_, incidentef0_.AFFECTED_TRANCHE_FK as AFFECTED8_22_0_, incidentef0_.BEGIN_POINT_FK as BEGIN9_22_0_, incidentef0_.END_POINT_FK as END10_22_0_, incidentef0_.CUSTOMER_LINKED_TRANCHE_FK as CUSTOMER11_22_0_, incidentef0_.INCIDENT_TYPE_FK as INCIDENT12_22_0_ from EFFECT incidentef0_ where incidentef0_.AFFECTED_TRANCHE_FK=? order by incidentef0_.AFFECTED_TRANCHE_FK
Once i pass by the line queryObject.list(), i get the following log
Code:
13:40:30,563 INFO [STDOUT] Hibernate: select effectivep0_.EFFECTIVE_TRANCHE_FK as EFFECTIVE26_1_, effectivep0_.ID as ID1_, effectivep0_.ID as ID14_0_, effectivep0_.PASSAGE_EFFECTIVE as PASSAGE2_14_0_, effectivep0_.THEORETICAL_COMPOSITION as THEORETI3_14_0_, effectivep0_.EFFECTIVE_COMPOSITION as EFFECTIVE4_14_0_, effectivep0_.THEORETICAL_DATE as THEORETI5_14_0_, effectivep0_.EFFECTIVE_DATE as EFFECTIVE6_14_0_, effectivep0_.PASSENGERS_UP_FIRST_CLASS as PASSENGERS7_14_0_, effectivep0_.PASSENGERS_UP_SECOND_CLASS as PASSENGERS8_14_0_, effectivep0_.PASSENGERS_DOWN_FIRST_CLASS as PASSENGERS9_14_0_, effectivep0_.PASSENGERS_DOWN_SECOND_CLASS as PASSENGERS10_14_0_, effectivep0_.PASSENGERS_STILL_FIRST_CLASS as PASSENGERS11_14_0_, effectivep0_.PASSENGERS_STILL_SECOND_CLASS as PASSENGERS12_14_0_, effectivep0_.DELAY as DELAY14_0_, effectivep0_.COMMERCIAL_INCIDENT_DESCRIPTIO as COMMERCIAL14_14_0_, effectivep0_.IS_COMPENSABLE as IS15_14_0_, effectivep0_.IS_EXTERNAL_FACTOR as IS16_14_0_, effectivep0_.COMPENSATION_PERCENTAGE as COMPENS17_14_0_, effectivep0_.TOTAL_IMPUTATION as TOTAL18_14_0_, effectivep0_.END_OF_MISSION_INFO_PRESENT as END19_14_0_, effectivep0_.STATION_TYPE as STATION20_14_0_, effectivep0_.POINT_FK as POINT21_14_0_, effectivep0_.THEORETICAL_LINKED_TRANCHE_FK as THEORET22_14_0_, effectivep0_.TRAIN_SET_FK as TRAIN23_14_0_, effectivep0_.EFFECTIVE_LINKED_TRANCHE_FK as EFFECTIVE24_14_0_, effectivep0_.COMMERCIAL_INCIDENT_TYPE_FK as COMMERCIAL25_14_0_ from EFFECTIVE_PASSAGE effectivep0_ where effectivep0_.EFFECTIVE_TRANCHE_FK=? order by effectivep0_.EFFECTIVE_TRANCHE_FK
13:40:30,567 INFO [STDOUT] Hibernate: select incidentef0_.AFFECTED_TRANCHE_FK as AFFECTED8_1_, incidentef0_.ID as ID1_, incidentef0_.ID as ID22_0_, incidentef0_.DELAY as DELAY22_0_, incidentef0_.COMMENTS as COMMENTS22_0_, incidentef0_.TYPE as TYPE22_0_, incidentef0_.DATE as DATE22_0_, incidentef0_.INCIDENT_EFFECT_LINK as INCIDENT6_22_0_, incidentef0_.TRIGGERING_INCIDENT_FK as TRIGGERING7_22_0_, incidentef0_.AFFECTED_TRANCHE_FK as AFFECTED8_22_0_, incidentef0_.BEGIN_POINT_FK as BEGIN9_22_0_, incidentef0_.END_POINT_FK as END10_22_0_, incidentef0_.CUSTOMER_LINKED_TRANCHE_FK as CUSTOMER11_22_0_, incidentef0_.INCIDENT_TYPE_FK as INCIDENT12_22_0_ from EFFECT incidentef0_ where incidentef0_.AFFECTED_TRANCHE_FK=? order by incidentef0_.AFFECTED_TRANCHE_FK
13:40:35,172 INFO [STDOUT] Hibernate: update REGULARITY_FORM set NUMBER=?, CREATION_DATE=?, COMPLEMENTARY_INFORMATION=?, CUSTOMER_SERVICE_INFORMATION=?, STATUS=?, LAST_VALIDATION_DATE=?, EFFECTIVE_TRANCHE_FK=? where ID=?
13:40:35,172 INFO [STDOUT] Hibernate: update REGULARITY_FORM set NUMBER=?, CREATION_DATE=?, COMPLEMENTARY_INFORMATION=?, CUSTOMER_SERVICE_INFORMATION=?, STATUS=?, LAST_VALIDATION_DATE=?, EFFECTIVE_TRANCHE_FK=? where ID=?
13:40:35,172 INFO [STDOUT] Hibernate: update REGULARITY_FORM set NUMBER=?, CREATION_DATE=?, COMPLEMENTARY_INFORMATION=?, CUSTOMER_SERVICE_INFORMATION=?, STATUS=?, LAST_VALIDATION_DATE=?, EFFECTIVE_TRANCHE_FK=? where ID=?
13:40:35,172 INFO [STDOUT] Hibernate: update REGULARITY_FORM set NUMBER=?, CREATION_DATE=?, COMPLEMENTARY_INFORMATION=?, CUSTOMER_SERVICE_INFORMATION=?, STATUS=?, LAST_VALIDATION_DATE=?, EFFECTIVE_TRANCHE_FK=? where ID=?
13:40:35,173 INFO [STDOUT] Hibernate: update REGULARITY_FORM set NUMBER=?, CREATION_DATE=?, COMPLEMENTARY_INFORMATION=?, CUSTOMER_SERVICE_INFORMATION=?, STATUS=?, LAST_VALIDATION_DATE=?, EFFECTIVE_TRANCHE_FK=? where ID=?
13:40:35,173 INFO [STDOUT] Hibernate: update REGULARITY_FORM set NUMBER=?, CREATION_DATE=?, COMPLEMENTARY_INFORMATION=?, CUSTOMER_SERVICE_INFORMATION=?, STATUS=?, LAST_VALIDATION_DATE=?, EFFECTIVE_TRANCHE_FK=? where ID=?
13:40:35,176 INFO [STDOUT] Hibernate: select regularity0_.ID as ID10_, regularity0_.NUMBER as NUMBER10_, regularity0_.CREATION_DATE as CREATION3_10_, regularity0_.COMPLEMENTARY_INFORMATION as COMPLEME4_10_, regularity0_.CUSTOMER_SERVICE_INFORMATION as CUSTOMER5_10_, regularity0_.STATUS as STATUS10_, regularity0_.LAST_VALIDATION_DATE as LAST7_10_, regularity0_.EFFECTIVE_TRANCHE_FK as EFFECTIVE8_10_ from REGULARITY_FORM regularity0_ where regularity0_.EFFECTIVE_TRANCHE_FK=?
Anyway, i don't see any setXXX()...
Any idea?
Thanks in advance.
(and sorry for tthe loooong logs, byt maybe u will see something i didn't notice!)