<p>Here is a simplified version of my database model.  I have two tables: "Image", and "HostingProvider" which look like this:</p>

<p><strong>[Image]</strong></p>

<ul>
<li>id</li>
<li>filename</li>
<li>hostingprovider_id</li>
</ul>

<p><strong>[HostingProvider]</strong></p>

<ul>
<li>id</li>
<li>base_url</li>
</ul>

<p>Image HostingproviderId is a many-to-one foreign key relationship to the HostingProvider table. (Each image has one hosting provider).  </p>

<p>Essentially I want to be able to have my Image class look like this:</p>

<p><strong>[Image]</strong></p>

<ul>
<li>Id</li>
<li>base_url</li>
<li>filename</li>
</ul>

<p>In NHibernate, how can I create a mapping file that will combine the base_url from the HostingProvider table, into the Image class?</p>

```
```
public class Image {
    public virtual HostingProvider HostingProvider { get; set; } // NHibernate takes care of this
    public virtual string BaseUrl { get { return HostingProvider.BaseUrl; } }
}
```
```