I have an NHibernate mapping for a class called MediaStyle which includes this mapping:
<bag name="EngineSteps" table="core.MediaStyleMediaPrintEngineStepAssoc" order-by="Sequence" lazy="true" cascade="none">
<key column="MediaStyleId"/>
<many-to-many class="MediaPrintEngineStep" lazy="proxy" />
</bag>
The class MediaPrintEngineStep is also mapped, and the class contains a property 'Sequence'. Sequence isn't stored on the table MediaPrintEngineStep maps to, but is contained on the association table used to map EngineSteps to MediaStyles.
Is there a way to have nHibernate map the 'Sequence' column from core.MediaStyleMediaPrintEngineStepAssoc into the empty property on the MediaPrintEngineStep class, or will I have to write additional code to get/set the sequence after it has been mapped? Unfortunately, refactoring the storage structure isn't an option at the moment.
If I do have to write my own code to map it, what's the best way to do so using the fewest database hits?