• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with findByExample  RSS feed

 
Chris Boldon
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have never had a problem with find by example before, of course until it is important to my project.

I am using hibernate and spring. When I use the find by example it returns the whole collection, instead of a list of items that match the example.

My findByExample method in the dao:


My test method:
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is projectId your primary key? findByExample doesnt filter if primary key is used.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!