this is the first project I actually had to give up on NHibernate.
I've used it for 2 years but I just couldn't get it to do what I
needed it to do.  There were many problems.

- We had a very complex object model that had lots of bidirectional
relationships between one-to-many and one-to-one relationships.  It
became a problem figuring out how to make sure each child object also
had a reference to the parent.  I kept getting many object reference
errors either when nhibernate was loading the objects, or when trying
to run the project after stuff was loaded.
- We didnt create the database or think about nhibernate until the
object model was done.  We probably should have done persistance "as
we went" rather than try to retrofit it at the end.  I had to make
many changes to the object model, like putting empty setters for read
only properties we wanted saved to the database but calculated on the
fly when in memory.
- I needed to do all inserts--no updates on every save for auditing
and logging.  I tried replicate(), i tried stateless session.  I
couldn't get it to cascade save the entire object model but also to do
inserts and not do updates.  I guess what i was trying to do was very
much "outside the box".
- to complicate things further I was trying to use fluent nhibernate,
and some of the mapping features are either not there or not well
documented.  One-to-one relationships are very common in the object
world, but nhibernate and fluent nhibernate seems to make them complex
to map.
- I had trouble mapping things like Dictionary<SomeEnum, decimal>

I finally gave up and wrote a bunch of hand made data access/mapping
code.  I would say the major problems here was lack of documentation,
nhibernate's inherent complexity, and trying to retrofit.  I really
think NHibernate is very powerful, but there are so many gotchas that
it made me really think twice about continuing to use it.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to