I will certainly look into "p6spy" and maybe even plug our own PreparedStatement into Hibernate.
But I was actually hoping that this was a standard feature of Hibernate. Something like
Code:
hibernate.show_sql true
hibernate.show_sql_parameters true
Since Hibernate is "filling in" the values for the bind variables anyway, it should be "easy" to print them to the log ...
I am currently evaluating Hibernate for an upcoming project and I am quite impressed by what I have seen so far. But all the people to whom I have shown my sample and the generated SQL, have asked me right away "Can you also see the parameter values?"