Omitting cache usage
Hi,
I'm quite new to Fluent NHibernate. I incorrectly mapped my cache as
HasMany(Of Bond)(Function(f As Fund) f.Bonds).Inverse.Cache.IncludeAll()
i.e. I omitted the method to generate the usage attribute.
I got a very vague runtime error about the configuration being invalid. Because I'm new to this all, it took me ages to track down the problem. I ended up downloading the FH source and debugging it.
I'l like to make two suggestions:
- When the method that generates the usage attribute (.e.g .ReadOnly()
) is missing, a clearer exception should be thrown. - At least catch the exception soon enough so that FH can tell me in which Class / ClassMap the problem is. I have loads of classes and maps and took me a long time just to track down the culprit class.
Support Staff 2 Posted by Paul Batum on 07 Jul, 2010 11:46 AM
This sounds like a relatively straightforward change. Contributions welcome!
http://wiki.fluentnhibernate.org/Contributing