• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoResultException

 
Ismael Gimenez
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, im having trouble with the code listed below.



When i the system execute the code it returns null insted of throwing an exception.

I donno why.
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked the generated query in this case? What id returns if executed directly against the DB?
 
Ismael Gimenez
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijitha, thanks for the response.

A few days ago i realized that I was somehow wrong, since the query did find results. That is to say, it finds a result in the DB with the name pass as parameter and the query returns a property of that result that it turns out to be null.
Therefore, it finds a result that is null, that is different to not finding a result at all.

Anyway, thanks for your time!

Cheers!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic