2

One of the property of my class is mapped to a function. My mapping looks like this:

mapping.Map(x => x.FormulaField, "FormulaField") .Formula("FUNCTION_NAME") .LazyLoad();

NOTE: mapping is an instance of AutoMapping

When I checked the SQL generated the "FormulaField" column is being selected. What am I missing?

drammer
  • 21
  • 2

1 Answers1

2

Which version of NHibernate are you using? I think lazy-properties are only available in NHibernate 3.0 (which is still in beta), and I'm not even sure whether Fluent NHibernate fully-supports NH3 lazy-properties - as there has been no NH3 build of Fluent NHibernate yet.

More info on lazy-properties: http://ayende.com/Blog/archive/2010/01/27/nhibernate-new-feature-lazy-properties.aspx

Simon Bartlett
  • 1,940
  • 13
  • 15
  • Hi Simon thanks for the reply. Yes I have read that blog. I may have missed where it said there when it is available. I am using NH 2.1.2 and FluentNH 1.2. I have read that FluentNH 1.2 support lazy loading, but maybe on classes. So if lazy-properties is not available in NH 2.1 what are my options? – drammer Nov 16 '10 at 14:35
  • The only option to get lazy-properties, is to use the latest beta release of NH 3.0 - and then download the source of FluentNH and compile it against NH 3.0. This is what I'm using in my latest project, and I've found it stable enough to use. – Simon Bartlett Nov 16 '10 at 16:38