[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7023) Deprecate HQL-specific (JDBC-style) positional parameters
Steve Ebersole (JIRA)
noreply at atlassian.com
Mon Feb 6 07:26:13 EST 2012
Deprecate HQL-specific (JDBC-style) positional parameters
---------------------------------------------------------
Key: HHH-7023
URL: https://hibernate.onjira.com/browse/HHH-7023
Project: Hibernate ORM
Issue Type: Deprecation
Components: query-hql
Reporter: Steve Ebersole
Deprecate the Hibernate-specific (JDBC-style) positional parameters in favor of the JPA-style.
{code}
// 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" )
...
{code}
This would allow the following from HQL:
{code}
Query q = session.createQuery( "from Cat c where c.name = ?1" )
.setParameter( 1, "Tabitha" )
...
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list