facebook

[Closed] Help turning on hibernate SQL output

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #261900 Reply

    mbeede
    Member

    Environment: Windows XP SP2, Eclipse v3.2.0, MyEclipse v5.0.1, JBoss v4.0, Hibernate v3, MS-SQL Server 2005 DB

    Greetings – I have a web application running on my local PC with the environment listed above. I am running into SQL-related problem with Hibernate. In order to resolve it I need to see the actual SQL generated for my query, taking into account the Hibernate mappings.

    In some other posts I see that there is a way to turn on SQL output, however, I don’t seem to have a “hibernate.cfg.xml” file anywhere on my hard disk. Did this change in v5.0?

    Can someone tell me specifically how to enable SQL output for version 5.0 of MyEclipse/Hibernate? Please be specific on this if you don’t mind.

    Thanks in advance,

    Mark

    #261925 Reply

    Riyad Kalla
    Member

    Mark,
    No we didn’t change anything, if your project is a Hibernate project you *need* to have a hibernate.cfg.xml file in it… I’m not sure how you would even be able to run hibernate queries without one…

    Assuming you find it, you just need to set the “show_sql” property to “true”

    #261928 Reply

    Haris Peco
    Member

    Mark,

    If you haven’t hibernate.cfg.xml file (check in your source directory), try find hibernate.properties file

    Regards,

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: [Closed] Help turning on hibernate SQL output

You must be logged in to post in the forum log in