I've never tried to use <join table> but have seen a blog about it:
http://andersnoras.com/blogs/anoras/arc ... ables.aspx
The blog said the it wouldn't make it into the final 1.2 build...not sure what current disposition is. You could try getting code off the trunk and see if it's supported there.
However, you could use a <subclass_join>. It looks like this and is under <class>
Code:
<joined-subclass
name="BlahBlah.Core.MyClass, BlahBlah.Core"
table="MyClassTable">
<key column="MyClassId"/>
<property name="Prop1" column="Prop1" not-null="true" />
...
</joined-subclass>
Your class structure would have <class> as your base and would be something like class AbstractTradeExternalMap. TradeExternalMap would derive from that and properties pertaining to the derived class would go into the joined-subclass section.
Problems with this?
1. "key" of joined-subclass is the foreign key to the parent table...this
doesn't look to fit into your domain model.
2. subclass and joined-subclass can't be used together in the same class
mapping.
Alternatively, you can have a TradeExternalMapResult class and set up a one-to-one relationship with TradeExternalMap. You'd declare the one-to-one so that it's sharing the primary key with TradeExternalMap.
Does that help?