Well, it turned out that it was my fault for leading NHibernate on a wild goose chase. It is just a testimony to the greatness of NHibernate and its tenacity to produce a valid query even in the face of ambiguity.
Basically, I have a discrminated hierarchy with implicit polymorphism as follows
Code:
Canister
public virtual int State { get; set } => Not in mapping
SimpleCanister << Canister
public override int State { get; set; } => Simple mapping
SmartCanister << Canister
public override int State { get; set; } => Formula mapping
I have to specialized Canisters, with one using a Formula to obtain the state (FYI These are Canisters with Chips that can advertise there State in a database)
I was intending on querying for SmartCanisters using the State, but I used a DetachedCriteria for the Canister class. As you would imagine, what NHibernate would use in the condition is a bit ambiguous. It actually used the Simple State property instead of the Forumula which was the source of the original post. Once I created the DetachedCriteria for SmartCanister, it worked as expected.
cheers,
craig
[/code]