Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Seeing Generated SQL Along with paramter Values for Criteria Calls

 
Chetan Pandey
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All:

My setting show_sql= true enables me to see the equivalent generated Native SQL for my Criteria API but is their a Way to do also see what goes in the paramter values which only show as '?' -question marks-

Any help is appreciated.

Thanks.

Chetan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming its Hibernate we are talking about here?

Enable debug logging for Hibernate types. This will tell you what is being bound.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or you could also try something like P6Spy, which will intercept all JDBC calls and you can see the SQL through that.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic