http://puredotnetcoder.blogspot.co.uk/2011/07/mixed-mappings-with-hbm-and-mapping-by.html
One way to do it is to add .Configure() after… var configure = new Configuration().Configure(); /.Configure, this is the magic that allows you to use the mixed mappings Many Thanks Richard From: [email protected] [mailto:[email protected]] On Behalf Of Ricardo Peres Sent: 24 November 2015 14:35 To: nhusers <[email protected]> Subject: [nhusers] Re: Mixed hbm and code mapping var cfg = new Configuration(); var modelMapper = new ModelMapper(); mapper.Class<MyEntitt>(ca => { //whatever }); var mappings = modelMapper.CompileMappingForAllExplicitlyAddedEntities(); var assemblyName = ...; cfg.AddAssembly(assemblyName); //assembly containing HBM.XML mapping files as embedded resources cfg.AddMapping(mappings); var sessionFactory = cfg.BuildSessionFactory(); On Tuesday, November 24, 2015 at 11:20:58 AM UTC, daniel doran wrote: Hi, Is there an example of mixed HBM and code (loquacious ) mapping? If not a complete example, are there anycode snippets? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
