-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: search by any attribute ?
PostPosted: Fri Aug 27, 2010 6:21 pm 
Newbie

Joined: Wed Jul 07, 2010 6:33 pm
Posts: 6
So, I have hibernate mappings and some POJO.
For example the
book table having columns id, name, publisher, pages maps to a hibernate POJO.

Now what I am looking is for the ability to search by any attribute of the object.
something similar to this..

Code:
Book b = new Book();
b.setName('hibernate in action);
someHibernateAPI.search(b);

or..
Book b = new Book();
b.setPublisher('BookHouse');
someHibernateAPI.search(b);



Any ideas on those line ?


Top
 Profile  
 
 Post subject: Re: search by any attribute ?
PostPosted: Fri Aug 27, 2010 6:59 pm 
Regular
Regular

Joined: Sun Feb 14, 2010 3:29 pm
Posts: 58
Location: USA
Try reading the doc on criteria/example query.
http://docs.jboss.org/hibernate/stable/ ... a-examples


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.