Results 1 to 2 of 2

Thread: question with getHibernateTemplate().find()

  1. #1

    Default question with getHibernateTemplate().find()

    I know I can use getHibernateTemplate().find("from test where id=?",strid) to exact data from db,now I want to know how to use two parameters with getHibernateTemplate().find(),such as
    getHibernateTemplate().find("from test where id=? and pass=?",strid,strpass),but when I compile above code,it raise error,it say can't find getHibernateTemplate().find(String,String,String)
    I want to know how to realize my code?

    Thanks!

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

    Default

    It's always a good idea to have a read of the JavaDoc. The find method is overloaded and one of these provides an Object[].
    http://www.springframework.org/docs/....Object[])
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

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