Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Data JPA _ findByExample

 
Niall Loughnane
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Niall Loughnane
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic