Now that we have some basic logging configured, NHibernate spits out a lot of information. You will see various messages displayed such as "Using reflection optimizer" and "Mapping resource:". These messages let you know what NHibernate is doing, what stage of operation it is in, and what issues (if any) it encounters.
One of the first things you will see in these logs is the name of the assembly that we told NHibernate to read the mapping files from.
07:18:08.295 [10] INFO NHibernate.Cfg.Configuration - Mapping resource: Ordering.Data.Mapping.Address.hbm.xml
As we included the *.hbm.xml
files in the Ordering.Data.Mapping
assembly, NHibernate is processing these files and logging as it processes each property of each file. NHibernate will list each of the properties in the mapping document, which class it belongs to, as well as the database field that is it being mapped to. An example of one of these mapping entries would look something like as follows:
07:32:49.299...