Mapping a dictionary with NH. Declaration is as follows:
<hibernate-mapping ...
<map
name="CostsByRole"
table="JobAccountingSnapshotCosts"
lazy="false"
fetch="join"
access="nosetter.camelcase-underscore">
<key column="SnapshotId" />
<index column="RoleCode" type="String" />
<element column="Amount" type="Decimal" />
</map>
</hibernate-mapping>
I am expecting a single SQL query to be generated but instead I get two: a select for the actual object, followed by a select for the contents of the dictionary.
Any ideas?