p6spy對於調試hibernate查詢非常有用,但是,還有什麼方法可以用相同的Hibernate邏輯格式化查詢? :p6spy日誌與Hibernate日誌
<property name="hibernate.format_sql" value="true" />
P6SPY日誌例如: p6spy - 1339663561390|15|0|statement|select personne0_.id as id5_,personne0_.dateNaissance as dateNais2_5_, personne0_.nom as nom5_, personne0_.prenom as prenom5_, personne0_.type as type5_ from Personne personne0_ where personne0_.nom=?|select personne0_.id as id5_, personne0_.dateNaissance as dateNais2_5_, personne0_.nom as nom5_, personne0_.prenom as prenom5_, personne0_.type as type5_ from Personne personne0_ where personne0_.nom='example'
Hibernate的日誌例如:
Hibernate:
insert
into
TABLE
(COLUMN_1, COLUMN_2)
values
(?, ?)
我覺得休眠格式更可讀,我希望這樣的事情與P6SPY。
謝謝。