我想从fluent.nhibernate
获取此输出<map name="Dict" table="TABLE">
<key column="ID_USER" />
<index-many-to-many column="ID_TABLE" class="TableClass" />
<element column="COL" type="Int32" />
</map>
班级有:
public class User
{
public virtual IDictionary<TableClass, int> Dict { get; protected set; }
}
我最接近的是:
HasMany(x => x.Dict)
.Table("TABLE")
.KeyColumn("ID_USER")
.AsMap<TableClass>("ID_TABLE")
.Element("COL");
输出就是:
<map name="Dict" table="TABLE">
<key>
<column name="ID_USER" />
</key>
<index type="TableClass">
<column name="ID_TABLE" />
</index>
<element type="Int32">
<column name="COL" />
</element>
<one-to-many class="Int32" /> <!-- BUG -->
</map>
如何删除最后一行(标有BUG)?
并不总是需要(就像在我的例子中那样)!