We where trying to map a Reference with a Formula, our code looks like
mapping.References(x => x.SomeClass).Formula("(SELECT TOP 1 a.id FROM SomeClass a WHERE a.Condition IS NULL AND a.ParentId = id)");
the resulting hbm.xml is almost right, but it adds and invalid child element "column"
<many-to-one class="Assembly.SomeClass, Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="SomeClass" formula="(SELECT TOP 1 a.id FROM SomeClass a WHERE a.Condition IS NULL AND a.ParentId = id)">
<column name="SomeClassId" />
</many-to-one>
We where trying to map a Reference with a Formula, our code looks like
the resulting hbm.xml is almost right, but it adds and invalid child element "column"