locked
What is Mapping node in NHibernate configuration and Need to keep only 1 NHibernate file RRS feed

  • Question

  • User908929258 posted

    Can someone please explain what <mapping> node will do in the below nhibernate configuration?

    There are some answers but I cannot understand clearly.

    In my project there are multiple same NHiberbate configuration files exist with the only difference in assembly name in <mapping> node (SomeAssemblyName1, SomeAssemblyName2).

    How can I keep only 1 NHibernate configuration supporting multiple assemblies?

    1st file

    <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">

      <session-factory>

        <mapping assembly="SomeAssemblyName1"/>

      </session-factory>

    </hibernate-configuration>

    2nd file

    <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">

      <session-factory>

        <mapping assembly="SomeAssemblyName2"/>

      </session-factory>

    </hibernate-configuration>

    Wednesday, November 29, 2017 11:34 PM

All replies