Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Thanks for your response!! After spending a day, I've figured out that and removed that method from my repository. But findOne(<PrimaryKeyClass> id) idea sounds good. I'll try that!!. Commented Feb 5, 2013 at 4:47
  • It also fixed my problem, BUT what the ...? why would it want to map the query result from the name of the method?? it should done it from the parameters get from the DB, could you please elaborate further?? Commented Apr 10, 2014 at 11:30
  • The way this works is that it's always the name of the attributes' getter/setter methods that are matched against the database columns. You can modify this by giving the attribute a different name and using the @Column("MyColumnName") annotation to manually do the mapping. If you don't do any of them (neither name matching or @Column) then the framework doesn't know how to map the query result against your object. Commented Apr 11, 2014 at 12:57
  • Thank you so much, I've been struggling with this for a day now and just couldn't understand what my problem was. Commented Aug 18, 2014 at 10:09