Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hibernate/NHibernate mapping file editor

I'm looking for an editor that has the help from

http://www.hibernate.org/hib_docs/nhibernate/html/mapping.html

built in, and allows simple editing of the XML files in a GUI fashion. I realise there's CodeSmith and MyGeneration, but from what I remember these only go one way, and don't allow editing existing HBM files.

like image 285
Chris S Avatar asked Feb 09 '09 15:02

Chris S


People also ask

What is the difference between NHibernate and fluent NHibernate?

Fluent NHibernate offers an alternative to NHibernate's standard XML mapping files. Rather than writing XML documents, you write mappings in strongly typed C# code. This allows for easy refactoring, improved readability and more concise code.


2 Answers

Probably worth taking a look at the NHibernate Query Analyzer by Oren Eini. Primarily used to analyze HQL queries it also has a fairly useful HBM editor:

NHibernate Query Analyzer Screenshot http://img6.imageshack.us/img6/5617/nhqa.gif

Old Project Page (with flash demo): http://ayende.com/projects/nhibernate-query-analyzer.aspx

New Project Page: http://www.assembla.com/wiki/show/NHibernateQueryAnalyzer

This will allow editing for HBM files and will show all of the available attributes for each mapping node.

Given that you can download the source code it wouldn't be that trivial to add the inline help.

like image 124
Codebrain Avatar answered Oct 06 '22 18:10

Codebrain


I don't believe there is an editor for Hibernate/NHibernate mapping files that has context-sensitive help. If you are a .NET developer (using NHibernate and Visual Studio .NET) you can edit the mappings with IntelliSense by registering a schema document: see Using NHibernate with Visual Studio .NET for instructions.

Another option to consider is using the NHibernate's Fluent API. This replaces mapping files with strongly-typed C# code.

like image 43
JulianM Avatar answered Oct 06 '22 19:10

JulianM