What we did was we actually put all of our mapping files
(EntityName.hbm.xml) as embedded resources to an external assembly then
called:

                    m_Configuration.AddAssembly(sAssemblyName);

there should also be a few others like AddFile(), etc on the
configuration.  If my memory suits me, we used to embed the mapping
files in our along with our entity classes and call
AddAssembly(Assembly) and passing in typeof(EntityName).Assembly.  That
last part is from memory so the method call could be worng but the point
is there. =)

Hope that helps.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of tqwhite
Sent: Tuesday, March 09, 2010 2:36 PM
To: nhusers
Subject: [nhusers] Multiple Classes per File

I am working with an "industry standard" data model. I grabbed the xsd
and converted it into a file full of C# classes that appear to be just
wonderful for my NH needs. Now that I see the generated schema, I see
that none of those are being recognized by NH. The one demo class that
has its own file and a convention-named hbm is.

I don't understand how NH knows what to do. The underlying magic is
invisible to me and I haven't been able to find an explanation
(something that future historians will not suffer if I ever understand
well enough to write it down).

In this case, I made a mapping file for one of the classes and put it
into the directory with the big file. No dice. Can anyone tell me how
to make this work?

For that matter, it seems to me that it would be reasonable for NH to
work directly with the xsd. I don't know.

Any perspectives that would help me with this?

As always, I remain gratefully yours,
tqii

-- 
You received this message because you are subscribed to the Google
Groups "nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to