-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to print SQL
PostPosted: Tue Dec 07, 2004 1:54 pm 
Newbie

Joined: Wed Oct 13, 2004 11:23 am
Posts: 14
Hibernate version:2.1.7

Mapping documents:
This is just one VO

<hibernate-mapping>
<class name="com.util.vo.State" table="States">
<id name="id" type="int" column="id" unsaved-value="0">
<generator class="increment"/>
</id>
<property name="name"/>
<property name="shortName"/>
</class>

</hibernate-mapping>

This is in my hibernate-service.xml
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
<attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
<attribute name="DatasourceName">java:/fbds</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.FirebirdDialect</attribute>
<attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute>


</mbean>



Code between sessionFactory.openSession() and session.close():N/A

Full stack trace of any exception that occurs:No exception but I need to see the SQL statements.

Name and version of the database you are using: Firebird 1.5

The generated SQL (show_sql=true):show_sql attribute gives me error

Debug level Hibernate log excerpt:

When I add <attribute name="ShowSql">true</attribute> I get hibernate error after starting jboss saying attribute names ShoqSql is not valid .. same is the error when I use show_sql instead.

Thanks.
--Anand


Top
 Profile  
 
 Post subject: Got it
PostPosted: Tue Dec 07, 2004 3:11 pm 
Newbie

Joined: Wed Oct 13, 2004 11:23 am
Posts: 14
Just had to use attribute name - ShowSqlEnabled

--AM


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.