spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
55.28k stars 37.62k forks source link

Named parameters of hibernate named queries [SPR-80] #4814

Closed spring-projects-issues closed 20 years ago

spring-projects-issues commented 20 years ago

Omar Irbouh opened SPR-80 and commented

Hi everybody,

I updated HibernateOperations and HibernateTemplate to allow for using named parameters in hibernate named queries. added methods are:

- List findByNamedQuery(final String queryName, final String paramName, final Object value)
- List findByNamedQuery(final String queryName, final String paramName, final Object value, final Type type)
- List findByNamedQuery(final String queryName, final String[] paramNames, final Object[] values)
- List findByNamedQuery(final String queryName, final String[] paramNames, final Object[] values, final Type[] types)

I also updated HibernateTemplateTests to test the new methods. Could you please integrate this in spring framework 1.0?

Thank you, Omar Irbouh http://www.jroller.com/page/irbouho


Affects: 1.0 final

Attachments:

spring-projects-issues commented 20 years ago

Omar Irbouh commented

org.springframework.orm.hibernate.HibernateOperations

spring-projects-issues commented 20 years ago

Omar Irbouh commented

org.springframework.orm.hibernate.HibernateTemplate

spring-projects-issues commented 20 years ago

Omar Irbouh commented

org.springframework.orm.hibernate.HibernateTemplateTests

spring-projects-issues commented 20 years ago

Juergen Hoeller commented

Thanks for the suggestions - those methods indeed complete HibernateTemplate's set of convenience shortcuts. Juergen