Hibernate/NHibernate mapping file editor - nhibernate

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.

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.

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.

There is another option with Visual Studio. If you have Resharper you can download the plug-in for NHibernate mapping files. This solution has worked out perfectly for me. You can read more about the plug in here: http://nhplugin.lieser-online.de/. Hope this works for you.

Why not use ActiveWriter to generate the mappings? You can always edit them afterwards. AW generates the model / mapping for both NHibernate and ActiveRecord. The editor runs WITHIN Visual Studio.NET and you can do drag-drop via server explorer.

The best option I've come across is is IDEA's Hibernate/JPA editor. IDEA is not free, however.

Have you tried Hibernate's own Eclipse plug-in named Hibernate Tools for Eclipse and Ant?
http://www.hibernate.org/255.html
Even if you dont have expirience with Eclipse and its add-ons it should be fairly straightforward to install and use their addon:
Just download it, unzip it into the eclipse directory, and fire up the IDE.
What you need to do next is to open up the Hibernate perspective.

I'm using VisualStudio and the schema (nhibernate-mapping.xsd) to activate the intellisense.
The plug-in for R# is useful to check the mapping with the class.

Related

Read Excel using Active JDBC in java

Can I read Excel file using active jdbc in java? I have been using Eclipse as IDE for java. Is there any jar files for active jdbc?
Can anyone help me in this?
ActiveJDBC is an ORM for database access. As such, it was not built to read Excel files. The latest version of ActiveJDBC can be pulled from Maven Central.
As You haven't given us exactly what you are trying to do. I'm suggesting another solution.
I have written a basic Excel ORM tool for these purposes. It's currently in development, but if you are looking for a basic solution you can try it.
I think it will mostly cover your basic needs.
And, feel free to contribute :)
Excel ORM GitHub Repository Link

intellij: wizard to create facades for my entities

Right now I'm doing a tutorial in Java EE. Problem is:
The tutorial says that I have to create facades of my entities from my database. The tutorial is designed for the NetBeans IDE, but at work i must use IntelliJ. I'm not a big fan of IntelliJ at the moment but i have no choice. So like the title says: is there an easy way to create facades for my entities like there is in NetBeans?
Thanks in advance :)
Uhm, no there is no such thing. IntelliJ actually requires you to be able to code yourself. Netbeans lacks that feature I think :).

Eclipse Generic File Templates

I've seen this question in various guises around the place, but as yet haven't found a suitable answer. If this is a duplicate, appologies (I'd be surprised if it wasn't a duplicate!)
Basically, I have a project which is using (mostly) shell code and sql. I want to make sure all the files have a similar setup, and that I document things consistently. To this end, I want to have template files / skeleton code within Eclipse.
It seems easy enough with Java, but not other file types. I have checked out ShellEd and it didn't appear to have this feature (correct me if I'm wrong).
It would be great to be able to add this as a new file type, such that I can say File -> New -> sh/sql and have the correct basic template with the right header etc.
Also, if possible I would like to be able to, one click, add a function prototype with the correct documentation to my files...
I thought this would be easy enough, but a few days of Googling and messing about, it seems I need to write a plugin of my own... but I can't beleive that it's not possible, more likely my Google skills aren't up to scratch...
any help?
cheers
Rob
P.S I'm normally a Vi (not Vim) user, but have had Eclipse forced upon me!
For SQL the Data Tools Platform Extender SDK (DTP) Eclipse project contains a SQL editor with templates (under Database Development in Install New Software).

Are there some free NHibernate generator tool with C#, NHibernate.Mapping.Attributes?

Are there some free NHibernate generator tool with C#, NHibernate.Mapping.Attributes?
I don't want to use the xml mapping file, but want to use attributes, do you know some good generator tools which can support the latest version of NHibernate 3.3.1? Thanks!
I am a developer for the nmg codeplex tool. There was a new release this afternoon, if you still get an error, post the exception on codeplex and I will fix it tomorrow morning.
NHibernate mapping generator. This is probably the best free one I've found.
http://nmg.codeplex.com/
You can make use TT templates, mygeneration or and other tool which makes code based on templates. The tool is just a code generator, it does not know anything from NHibernate. The templetes you make will do the magic of generating for a specific product/version.

Code editor control VB .NET

Does anyone know if the code editor used by VSTO IDE is available to use in my own projects?
I need to use a code editor in my project. I Googled to try to find one, but I found several third party solutions (pay or free) but they don't fit my needs.
In same way as Webbrowser control, is the "sourcecodeeditor" control of VSTO available to use as a project component?
In same way as Webbrowser control, is the "sourcecodeeditor" control of VSTO available to use as a project component?
[. . .]
Exists the class "MSVSTOSourceCodeEditor"? This is the question. Thanks
Unfortunately, no. Microsoft doesn't allow you to subclass its source code editor, nor do they provide a version for use in your own projects. As I mentioned before, they don't really want to encourage you to rewrite Visual Studio. They'd prefer that you bought it instead!
Have you considered creating a plug-in or extension for Visual Studio instead? It's a little bit different way of going about it, but it just might work for you. Your developers might find it more convenient since they won't have to switch back and forth between two programs.
If you're really set on rolling your own custom solution, probably the best thing to do is check the source code for some of the open-source, Visual Studio-style IDEs, and see how they've written the code editor:
MonoDevelop
SharpDevelop
KDevelop