We actually use NHibernate here at work, and there's a lot I like
about it. But it has some issues:
1) The api is showing its age. A lot of stuff is deprecated or
inconsistent. There's a lot of leftovers from the java version I
think.
2) The Linq and Fluent Interface stuff are seperate projects in
seperate downloads.
3) Bidirectional mappings are a pain to set up and require changes to
your domain layer.
4) The mappings aren't very clear. Setting up a one-to-one is a pain
if you don't know what you're doing. lazy load isn't available in all
situations. There's (IMHO) an unnecessary number of seperate tags you
have to learn to do bags, sets, components, etc.
5) HQL is incomplete. Some things work, and some don't.
6) Lots of little developer surprises. For example, if you have a
many-to-one relationship, when NH saves your object, it saves its many-
to-one foreign key as null, then goes back and performs an update
statement to fill it. This wreaks havoc on NOT NULL constraints.
7) Using NHibernate in a tiered environment like a smart client is
difficult, especially with lazy-load enabled. If you want to
serialize your objects using WCF or old fashioned remoting and pull
them down over the wire, NH tries to lazy load every property. If you
turn off lazy loading, it prefetches everything.
In general, just a big learning curve. I think we can do better, and
EF isn't out yet and isn't very mature. Its not that I think i'm some
badass developer, but that i've seen a lot of the strengths and
weakneses in all the mappers.
NHibernate is a good product, but it will be replaced someone,
somewhere, its just a matter of when.
Craig