The realtionship started off well.  Now were undergoing a messy divorce.

Nhibernate - it seems to answer so many problems.  Unfortunately it creates a whole slew of new ones.

For anyone embarking on building SERIOUS applications then beware, it ain't a silver bullet to the problem of OR impedance.  Soft deletes in most applications (especially financial applications that we do) are often a big requirement (the FSA is a hard taskmaster).  NHibernate just can't cope with these.  Well, thats not strictly true - it can cope as long as you dont have ternary relationhips between objects, if you do, then your stuffed.

The recomended way is to hook into the delete event listener, which you can, but it will leave your relationship tables untouched and when you do a select then your 'deleted' object will arise 'a la Lazarus' to make you like like a clown to your clients.

Thankfully been a bunch of geniuses we rolled our own OR solution which will work on the web, pda's and the desktop and it fits into a lovely dll.  NHibernate is a great idea and useful for basic apps but a poor implementation for serious development.

Avoid.

 


Comments

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



Sapere Software Blog

Software Development, .NET and Other Stuff