aspose file tools*
The moose likes Spring and the fly likes Spring Data JPA _ findByExample Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Data JPA _ findByExample" Watch "Spring Data JPA _ findByExample" New topic
Author

Spring Data JPA _ findByExample

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 203
Hi,

does Spring Data JPA support findByExample method, i.e. where an object is passed in to search for items with a table,

Thanks,

Niall
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Based on the current documentation. No it is not possible. But you could have an implementation of one of your Repository to use the Criteria object in your code, which is a good way to do queryByExample

Good Luck

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 203
Hi Mark,

Thanks for your reply,

i have the code working now with queryByExample but is there a way to pass in an object into the qbe and to do both LIKE and case insensitive in the query?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

[quote=Niall Loughnane]Hi Mark,

Thanks for your reply,

i have the code working now with queryByExample but is there a way to pass in an object into the qbe and to do both LIKE and case insensitive in the query?[/quote]

I haven't used Criteria in that manner so not sure. But you can check out the Hibernate documentation. :D

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Data JPA _ findByExample
 
Similar Threads
Spring Data JPA
What to learn after basics of servlets and JSP?
Webpage not opening in eclipse
which technology
Hibernate and JPA with Spring