Quick questions Guys & Girls - I'm new to hibernate 3 and unsure how to write the following in a query:
I have a Categories table in the DB, with a boolean flag as one of the attributes, i want to return a list of all the items which have the boolean set to true. This is what i tried using, but it gave me an exception public List<Category> getMaleCategories() { return getHibernateTemplate().findByNamedParam("from Categories where male_only=?", "true", Hibernate.BOOLEAN); } I've tried by example object and that didnt seem to return the correct set! Any help would be very greatful :) Many thanx Sion -- View this message in context: http://www.nabble.com/How-to-query-in-Hibernate-3-tf3680950s2369.html#a10287100 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]