Uploaded image for project: 'Hibernate ORM'
  1. HHH-7023

Deprecate HQL-specific (JDBC-style) positional parameters

    Details

    • Type: Deprecation
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.1
    • Component/s: query-hql
    • Labels:
      None
    • Last commented by a user?:
      true
    • Sprint:

      Description

      Deprecate the Hibernate-specific (JDBC-style) positional parameters in favor of the JPA-style.

      // HQL positional parameters:
      Query q = session.createQuery( "from Cat c where c.name = ?" )
         .setParameter( 1, "Tabitha" )
         ...
      
      // JPQL style:
      Query q = em.createQuery( "from Cat c where c.name = ?1" )
         .setParameter( 1, "Tabitha" )
         ...
      
      JPQL style, from Hibernate API:
      Query q = em.createQuery( "from Cat c where c.name = ?1" )
         .setParameter( "1", "Tabitha" )
         ... 
      

      This would allow the following from HQL:

      Query q = session.createQuery( "from Cat c where c.name = ?1" )
         .setParameter( 1, "Tabitha" )
         ...
      

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                steve Steve Ebersole
                Reporter:
                steve Steve Ebersole
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 23m
                  23m