nhibernate / fluent-nhibernate

Fluent NHibernate!
BSD 3-Clause "New" or "Revised" License
1.66k stars 685 forks source link

AddMappingsFromThisAssembly doesn't work with inherited PersistenceModels #35

Open jagregory opened 13 years ago

jagregory commented 13 years ago

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

benfulton commented 13 years ago

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.

chester89 commented 12 years ago

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 commented 12 years ago

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

chester89 commented 12 years ago

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