1 Reply Latest reply on Oct 21, 2011 3:46 PM by Scott Marlow

    How to show hibernate sql in AS7?

    Sam W Expert

      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