Tuesday, November 13, 2007

New Features In NHibernate 2.0

Ayende has just blogged about the new features in NHibernate 2.0, the one that we are most interested in is the ability to map multiple tables to one class. This is very useful and we've been using it for a while.

Share This - Digg It Save to del.icio.us Stumble It! Kick It DZone

3 comments:

  1. Anonymous1:10 am

    ... and I've just received a notifcation that NHibernate can now map custom generic entities (a bug that I believe that you raised). See http://jira.nhibernate.org/browse/NH-960 for details

    ReplyDelete
  2. hi
    sorry for bothering but would you be so kind and give a brief example where it is necessary to map multiple tables to one class? Maybe that my creativity this morning isn't that good or just because of the fact that i'm not that db-guy, but i think that would be a kind of miss-design?
    thx a lot

    ReplyDelete
  3. @AGsystems
    It could be.

    As we see it we sometimes have one generic class mapped to multiple tables (the case Ayende shows how to map).

    We can create subclasses of the generic class, but in the situations where we're trying to do it we just end up with meangingless subclasses that add no state/behavior. We also don't believe that the subclasses are improving the design, so the generic mapping is attractive for those situations.

    ReplyDelete