Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-32227

Hibernate 4 getHIbernateTemplate.find and positional parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.0
    • Fix Version/s: 12.0
    • Component/s: Global
    • Labels:
      None

      Description

      Springs getHibernateTemplate().find() does not work correctly with Hibernate 4 ordinal parameters.

      Since ordinal parameters are deprecated in Hibernate the strategy is just to switch away from using them all together.

      So we switch getHibernateTemplate().find() to getHibernateTemplate().findByNamedParam() and update the query to use named parameters vs ordinal parameters. While in KNL-945 this was the practice a few were missed, hence this PR!

      After this fix there are only 11 uses of using getHibernateTemplate().find() which are not using any parameters:

      samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/AssessmentFacadeQueries.java:2
      samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/authz/integrated/AuthzQueriesFacade.java:1
      samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/ItemFacadeQueries.java:1
      samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/PublishedAssessmentFacadeQueries.java:3
      samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/QuestionPoolFacadeQueries.java:3
      samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/TypeFacadeQueries.java:1
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  ern Earle R Nietzel
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code