Diego,
Thanks for the response. This is where I am confused. I am new to
NHibernate so I got started based on examples I found which seemed to
work. For each table (entity), I have a different hbm.xml mapping
file. The mapping files (two) live in the FirstSample.Mappings
directory (FirstSample is the C# project). The two entity class files
live in the FirstSample.Domain directory and as such each of the
classes are in the namespace "FirstSample.Domain". So while they are
two different classes, both of the mapping files have this same entry:
<hibernate-mapping assembly="FirstSample"
namespace="FirstSample.Domain" xmlns="urn:nhibernate-mapping-2.2">
So when I add the assemblies to the configuration, the two lines:
configuration.AddAssembly(typeof (RptSourceGroup).Assembly);
configuration.AddAssembly(typeof (RptSource).Assembly);
really evaluate to:
configuration.AddAssembly(FirstSample.Domain.RptSourceGroup.Assembly);
configuration.AddAssembly(FirstSample.Domain.RptSource.Assembly);
Now, I am not sure what that really means, but apparently it is
causing a problem which I don't understand. My understanding was that
the assembly name is the name where the domain classes are
implemented, which looked to be the project name. Is this not
correct? I get other errors if I give the files an assembly name of
somethiong random (ex. MyAssemblyName1 and MyAssemblyName2). Are you
saying that because they are in the same assembly (I take that to mean
the same project), that both class definitions need to be within the
same file and not individual files?
Any help on understanding this would be very much appreciated.
Thanks - Peter