Hi,
Does anyone know how to display hibernate namedquery sql statement?
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="HousewareCategoryPU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/Houseware</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show-sql" value="true" />
</properties>
</persistence-unit>
</persistence>
But the above statment doesnt have any effect for displaying my run-time hibernate sql statments.
Any suggestion would be very appreciated.
Sam
Hi Sam, I think you have a typo (change the '-' to '_').
Instead try:
<property name="hibernate.show_sql" value="true"/>