fluent-nhibernate icon indicating copy to clipboard operation
fluent-nhibernate copied to clipboard

AddMappingsFromThisAssembly doesn't work with inherited PersistenceModels

Open jagregory opened this issue 14 years ago • 4 comments

If you inherit from PersistenceModel, the AddMappingsFromThisAssembly doesn't work because it (incorrectly) assumes the calling assembly is in FluentNHibernate.dll.

See: https://groups.google.com/forum/#!topic/fluent-nhibernate/-MDmyisPt_E/discussion

jagregory avatar Jul 21 '11 22:07 jagregory

I can't find any obvious issues. I think perhaps the assembly from which the user is expecting to add mappings is being optimized right out of the call stack in release mode. If I can find an email address I'll try to contact the OP.

benfulton avatar Sep 14 '11 02:09 benfulton

I think I know what's the problem - when inside a web app, Assembly.GetExecutingAssembly would return null (there's a reason for this, not sure what it is though). if Fluent is using this method, that may as well be the problem. Is this resolved @jagregory - it's not clear from discussion whether the fix was applied

chester89 avatar Oct 24 '12 19:10 chester89

what I meant is I can't get to the page on lighthouse - it says "it's not a public project"

chester89 avatar Nov 06 '12 13:11 chester89

well, I looked through the commit list from June 4, 2011 till the end of 2011 - and haven't found this fix

chester89 avatar Nov 06 '12 13:11 chester89