**Stephen Harvey** created an [issue](https://nhibernate.jira.com/browse/NH-3189) — <time datetime="2012-06-15T12:04:48.825Z" title="2012-06-15T12:04:48.825Z">15th June 2012, 12:04:48</time>: > Mapping by code does not provide a mechanism allowing the user to do the following: > > ``` > > <many-to-one name="EntityType"> > <formula>8579</formula> > <column name="ENTITY_SECTION" /> > </many-to-one> > > ``` > > This xml config allows the user to create a reference to a foreign key with a fixed value created by the formula. > > IManyToOneMapper allows a formula OR a set of columns, but not both. > --- **Alexander Zaytsev** added a comment — <time datetime="2014-11-24T21:12:53.373Z" title="2014-11-24T21:12:53.373Z">24th November 2014, 21:12:53</time>: > Does it work in HBM? >