NHibernate Forge
The official new home for the NHibernate for .NET community

NHibernate Workbench

In the spirit of “Release early. Release often. And listen to your customers” ( cit. ), even if not so early in term of time since the preview, I decided to release a first drop of the “HQL Intellisense thing” I’m working on. The current version is just able to load an existing mapping assembly, a configuration, help us to write an hql query, submit it to NH and see some results. Here an overall screenshot:


To use it you need to download the bits, and then “create a project” a project is, in the NH Workbench world, a bounch of file representing what we are working on ( and actually is a project in the MSBUILD world. To use the tool now we need at least a working NH configuration file ( your app.config or web config ) and one or more mapping assembly(ies). You add the files to the project by right clicking the project tree:s2

After you added the file you can save the project, so it can be reopened when needed. Please note that the mapping assembly has to be opened from a location containing all the required dependencies ( usually the application folder, or the bin folder ).

After the project is created, you need to compile it before starting to write the queries:


You can compile the project by clicking the button on the toolbar as shown in the picture Fig3




Compiling the project should produce a report in the log area:


If you find the report too verbose, you can uncheck some of the button in the log toolbar. After a successful compilation, we can open a query (hql) document:



This will open a pane in the document area in which we can write HQL queries with some intellisense/auto-completion. Plaese note that, for have the entity completion, after the “from” keyword we need to press ctrl+space to see the completion combo.








Here an example HQL document. After a valid query is done we can submit it to NH and see the result:


The “play” button is enabled only if a valid query ( no errors ) is written in the document. The first and count places are useful to limit the query results.

s7 By pressing the play button, you will be able to se the query results ( if any ):


Next steps:

  • Solve the bugs till now
  • Add supports for hbm2net, so user can write mapping and immediately see it at works.

Enjoy !

Posted may 19 2010, 04:29 p.m. by felicepollano
Filed under: , , ,


Diego Jancic wrote re: NHibernate Workbench
on 05-19-2010 16:06

Awesome man! I hope you continue with the work!

I'm waiting the addition of the hbm2net to the app! :)

Mohamed_Meligy wrote re: NHibernate Workbench
on 05-23-2010 1:48

I've just checked the stuff. The most incredible thing is how updated this is (last commit is yesterday, wow). Thanks a  lot. This is a really big project and should have more awareness from NH users. You rock, man.

venomcc wrote re: NHibernate Workbench
on 06-10-2010 9:44

Awesome! Any plans for a visual studio extension?

felicepollano wrote re: NHibernate Workbench
on 06-10-2010 11:49

I need to learn how to. Even having hbm2net better integrated in visual studio would help...

virtew wrote Revue du Web du 21 juin
on 06-21-2010 9:47

Revue du Web du 21 juin

Powered by Community Server (Commercial Edition), by Telligent Systems