Ayende @ Rahien

Refunds available at head office

NHibernate Query Analyzer for NHibernate 1.2 GA

I am a bit late with this one, but here is a new version for NHibernate 1.2 GA. This also supports Castle Active Record, hopefully in a version neutral way.

You can get it here, or admire the UI here:

image

As an aside, I am thinking about adding Criteria Query functionality, since this is something that I use a lot. I am not sure yet what form this would take, at any rate it would involve runtime code generation, so that is complex (and sort of fun/pain).

I am opened to ideas.

Have fun...

Comments

Bob Grommes
06/02/2007 10:10 PM by
Bob Grommes

Hi Ayende,

Just a note for your next release -- the status bar should read "Project was built successfully". ;-)

Looks like some great stuff!

Ayende Rahien
06/02/2007 10:20 PM by
Ayende Rahien

Thanks for noticing, I fixed it in the source, will be there for next release.

raul
06/03/2007 06:24 AM by
raul

Hello Ayende,

This seems like a very nice tool, but unfortunately I'm having problems with the documentation. The link in the app [Help->Online Doc] is broken. Can you give a link to the docs please?

Miki Watts
06/03/2007 07:21 AM by
Miki Watts

Hi Ayende,

I'm using ActiveRecord, and setting the base settings programmatically, like this:

        Hashtable properties = new Hashtable();


        properties.Add("hibernate.connection.driver_class", "NHibernate.Driver.SqlClientDriver");

        properties.Add("hibernate.dialect", "NHibernate.Dialect.MsSql2000Dialect");

        properties.Add("hibernate.connection.provider", "NHibernate.Connection.DriverConnectionProvider");

        properties.Add("hibernate.connection.connection_string", connectionString);


        ActiveRecordConfiguration source = new ActiveRecordConfiguration();

        source.Add(typeof(ActiveRecordBase), properties);


        ActiveRecordStarter.Initialize(typeof(Initializer).Assembly, source);

Would there be an option to specify at least those base settings in the project settings manually ?

Ayende Rahien
06/03/2007 07:51 AM by
Ayende Rahien

Miki,

No, there isn't any. You need to provide an app.config or a hibernate.cfg.xml file with the configuration

Steve
06/03/2007 12:54 PM by
Steve

Sorry for my ignorance, but when I double click on the .exe a quick cmd box pops up and then nothing happens.

I don't get the nice UI I see above.

Thanks

Ayende Rahien
06/03/2007 01:28 PM by
Ayende Rahien

Steve,

Are you sure that you have no downloaded NHibernate query GENERATOR ?

Steve
06/03/2007 04:57 PM by
Steve

That explains it - thanks

Mike
06/04/2007 05:39 PM by
Mike

When I New>>Project>>AddFile and bring in my *.hbm.files then try to 'Build Project' I get an unhandled SQLite exception...when I debug it says 'no such table: hibernateuniquekey'.

I have seen this when settin gthe conn string to 'New=True' but your exe.config is using New=False so that isn't it.

Any idea what I'm doing wrong?

AsbjornM
06/08/2007 01:02 PM by
AsbjornM

I have the same error as Mike, but then again, this is my first try.

Could it be possible that you could provide an small easy mapping and configuration file so we could test it with?

I don't know what to put inside the configurationfile, and have been looking here: http://www.hibernate.org/362.html but it does not look like it's even close..

Some sort of easy getting started like that document, using this tool would be nice.

Maybe it already exsists, but I don't know where to look.

Oleg
07/07/2007 10:02 PM by
Oleg

I have the same issue as two guys above. Can it be related to the fact that I use MS SQL Express 2005?

Oleg
07/08/2007 06:06 AM by
Oleg

The following solution to avoid the exception "unhandled SQLite exception: 'no such table: hibernateuniquekey'" should be applied:

go to <%APPDATA%\NHibernate Query Analyzer> folder and delete Sqlite.db.

Yamini
07/09/2007 09:38 PM by
Yamini

Hello,

I do not find the file SQLite.db in the above mentioned path and still get the same error. Do I need to create the SQLite.db ?

Comments have been closed on this topic.