0

Automapping in Nhibernate has been this wonderful magical thing, but now something strange is happening and I want to peel back this magical layer and see the actual mappings that are getting generated.

Is there a way to see the mappings generated by automapper and my overrides so I can see if it's doing what I think it's doing?

4

1 回答 1

1

If you are using Fluent then you should be able to write the persistence model to the disk:

// In your fluent config code
// assuming config is of type FluentNHibernate.Cfg.FluentConfiguration
var model = new FluentNHibernate.PersistenceModel();

config.Mappings(m => m.UsePersistenceModel(model));

model.WriteMappingsTo(@"C:\some_folder_name_for_hbm_files_to_go_into");     
于 2013-07-03T09:17:26.740 回答