How can I create an m:n relationship not using the primary key in NHibernate?
Assuming I had the following tables:

![Diagram of 3 tables: Publishers and Articles connected by a reference table named PublisherArticles][1]

If I now set up a many-to-many relationship in NHibernate, the `<key column />` attribute below will map the `PublisherArticles.VersionIndependentArticleId` to the primary key column of the article class (`Id`) instead of `VersionIndependentId`.

    <class name="Article" table="Articles">
        <id name="Id" />
        <property name="VersionIndependentId" not-null="true" />
        <property name="Version" not-null="true" />
        <property name="Text" not-null="true" />

        <set name="Publishers" table="PublisherArticles">
            <key column="VersionIndependentArticleId" />
            <many-to-many class="Publisher" column="PublisherId" />
        </set>
    </class>

Is there any way to target the `Articles.VersionIndependentId` column instead?

  [1]: http://i.stack.imgur.com/7Y3vI.png
How can I create an m:n relationship not using the primary key in NHibernate?
===

Assuming I had the following tables:

![Diagram of 3 tables: Publishers and Articles connected by a reference table named PublisherArticles][1]

If I now set up a many-to-many relationship in NHibernate, the `<key column />` attribute below will map the `PublisherArticles.VersionIndependentArticleId` to the primary key column of the article class (`Id`) instead of `VersionIndependentId`.

    <class name="Article" table="Articles">
        <id name="Id" />
        <property name="VersionIndependentId" not-null="true" />
        <property name="Version" not-null="true" />
        <property name="Text" not-null="true" />

        <set name="Publishers" table="PublisherArticles">
            <key column="VersionIndependentArticleId" />
            <many-to-many class="Publisher" column="PublisherId" />
        </set>
    </class>

Is there any way to target the `Articles.VersionIndependentId` column instead?

  [1]: http://i.stack.imgur.com/7Y3vI.png