Sunday, December 16, 2012

NHibernate Filter value not set

If you received this kind of error...

Filter [Filters] parameter [LanguageCode] value not set


...chances are you have this kind of code:

s.EnableFilter("Filters").SetParameter("LanguageCode", "zh");             

s.EnableFilter("Filters").SetParameter("FallbackLanguageCode", "en");


Must rewrite that to this:


s.EnableFilter("Filters")
    .SetParameter("LanguageCode", "zh")                        
    .SetParameter("FallbackLanguageCode", "en");

No comments:

Post a Comment