Results 1 to 2 of 2

Thread: Spring + hibernate with named query

  1. #1
    Join Date
    Jan 2007
    Posts
    5

    Default Spring + hibernate with named query

    I was trying to use the spring hibernate template. However, I couldn't find a way to specify setFirstResult using named queries. This option is available with criteria searching. Is there any reason why it's not available when I do getHibernateTemplate().find or getHibernateTemplate.findByNamedQuery()? Did I miss something?

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    You can simply use HibernateTemplate.execute(HibernateCallback). You can then just do the normal Hibernate things.

    http://www.springframework.org/docs/...rnateCallback)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •