mixing custom hbm files and automapping

Original Post MylesRip's Avatar

MylesRip

25 Mar, 2010 08:01 PM via web

I'm currently using AutoMappings, but I'd like to include a few hand-crafted hbm files for some classes. The examples I've come across so far are either not for automapping or/and use methods that don't match the current API.

(The reason I feel I need to do this is that I'm trying to get around NHibernate limitations that don't allow for component (value object) inheritance. I came across Colin Jack's blog entry here in which he creates multiple hbm mapping files that map multiple classes to one table. I think something like that could work for me, but my situation would be even more complex because there are multiple classes that would use my "inherited pseudo-components". Using his approach, I figure I'll need a separate hbm mapping file for each concrete inherited "component" type per each class that uses the types. Also, he mentions that the reason he needed to do that was because he was working with a pre-existing database that was hard to work with. I'm working on a green field project where I get to define both the domain model and the database, but I don't see another way to do it.)

    Reply to this discussion

    Preview Comments are parsed with Markdown. Help with syntax

    Attached Files

      You can attach files up to 10MB

      What day comes after Monday?

      Recent Discussions

      05 Jul, 2010 10:29 PM
      05 Jul, 2010 12:45 PM
      05 Jul, 2010 12:42 PM
      05 Jul, 2010 12:17 PM
      05 Jul, 2010 12:12 PM

       

      03 Jul, 2010 12:26 AM
      02 Jul, 2010 02:17 PM
      02 Jul, 2010 08:18 AM
      02 Jul, 2010 12:20 AM
      01 Jul, 2010 10:14 PM