[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5239) Criteria.setLockMode KO

bill dupond (JIRA) noreply at atlassian.com
Wed May 19 21:33:11 EDT 2010


Criteria.setLockMode KO
-----------------------

                 Key: HHH-5239
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5239
             Project: Hibernate Core
          Issue Type: Bug
          Components: query-criteria
    Affects Versions: 3.5.1, 3.5.0-Final
         Environment: MySQLDialect
            Reporter: bill dupond


This code doesn't work : the "for update " isn't add in the SQL query.

crit = HibernateUtil.currentSession().createCriteria(TIncident.class);
crit.add( Restrictions.ge("incDateImportCairn", dateImportCairnMin) );
crit.setLockMode(LockMode.PESSIMISTIC_WRITE);
crit.list();


the debug line :
20/05/10 03:19:11-Thread[main]-Class[SQL] | DEBUG | select this_.INC_ID as INC1_25_0_, this_.INC_ID_RATTACHEMENT as INC2_25_0_, this_.TIC_ID as TIC3_25_0_, this_.EQU_ID as EQU4_25_0_, this_.OPE_ID as OPE5_25_0_, this_.INC_DATE_IMPORT_CAIRN as INC6_25_0_, this_.INC_DATE_DEBUT as INC7_25_0_, this_.INC_DATE_FIN as INC8_25_0_, this_.INC_DUREE as INC9_25_0_, this_.INC_DATE_APPARITION_ALARME as INC10_25_0_, this_.INC_DUREE_MOIS as INC11_25_0_, this_.INC_DUREE_HEURE as INC12_25_0_, this_.INC_INSTANCE_OBJET as INC13_25_0_, this_.INC_CLASSE_OBJET as INC14_25_0_, this_.INC_NATURE_INCIDENT as INC15_25_0_, this_.INC_IMPACT_CLIENT as INC16_25_0_, this_.INC_CAUSE_INFORMATIVE as INC17_25_0_, this_.INC_PROBLEME_SPECIFIQUE as INC18_25_0_, this_.INC_INDICATION_TENDANCE as INC19_25_0_, this_.INC_TYPE_ALARME as INC20_25_0_, this_.INC_TYPE_INCIDENT as INC21_25_0_, this_.INC_CAUSE_N1 as INC22_25_0_, this_.INC_CAUSE_N2 as INC23_25_0_, this_.INC_CAUSE_N3 as INC24_25_0_, this_.INC_CAUSE_PROBABLE as INC25_25_0_, this_.INC_SEVERITE as INC26_25_0_, this_.INC_STATUT_ENREGISTREMENT as INC27_25_0_, this_.INC_COMMENTAIRE as INC28_25_0_, this_.INC_NB_CELL as INC29_25_0_, this_.INC_INDICATEUR_MISE_A_JOUR_IHM as INC30_25_0_, this_.INC_INDICATEUR_ASSOCIATION_TICKET as INC31_25_0_, this_.INC_INDICATEUR_ASSOCIATION_OPERATION as INC32_25_0_, this_.INC_INDICATEUR_PRISE_EN_COMPTE as INC33_25_0_ from pcrn01.t_incident this_ where this_.INC_DATE_IMPORT_CAIRN>=?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list