-->
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.  [ 3 posts ] 
Author Message
 Post subject: NHibernate Query Analyzer.exe -- tutorial?
PostPosted: Thu Jun 09, 2005 11:19 pm 
Regular
Regular

Joined: Mon May 30, 2005 11:20 pm
Posts: 66
Hey guys, just downloaded, "NHibernate Query Analyzer", I unpacked it, but now wondering what to do with it. Is there any tutorial for this tool? Or should I resort to SQL Server's SQL Profiler... Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 10, 2005 9:26 am 
Newbie

Joined: Thu May 19, 2005 6:04 am
Posts: 14
Location: Glasgow, UK
I'm starting to quite like it. To get started do the following:

1. download the source and recompile against the latest version of NHibernate (I noticed a hugh speed increase over the binary download version, which uses 0.7)

2. copy your assembly with embedded mappings to the same folder as the QueryAnalyzer exe (it seems to be unable to find it otherwise).

3. open Queryanalyzer, choose add files from the project menu and add your config file (either exe.config or web.config). QueryAnalyzer gets the connection info from this so create one with just the nhibernate config section if you configure nhibernate a different way (or look at the generate configuration option under the code generation menu). Now back to add files and add the assembly you copied earlier.

You can now enter HQL queries into the Queries tab (they're validated as you type. You can then click on Sql Query to see the actual sql generated,an press F5 to run the query. You then get a tree of object returned, which you can expand to look at sub objects etc.

You can then save queries for rerunning later (stored internally by query analyzer).

It saves the constant cycle of code,rebuild,run,test if your using Named queryies in hbm.xml files. There's also a quite nice gui for building mapping files.

Hope this helps

Mark


Top
 Profile  
 
 Post subject: THanks a bunch.
PostPosted: Sat Jun 11, 2005 9:14 pm 
Regular
Regular

Joined: Mon May 30, 2005 11:20 pm
Posts: 66
Hey thanks a bunch. Will try it tomorrow.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.