Here is a simplified version of my database model. I have two tables: "Image", and "HostingProvider" which look like this:
[Image]
- id
- filename
- hostingprovider_id
[HostingProvider]
- id
- base_url
Image HostingproviderId is a many-to-one foreign key relationship to the HostingProvider table. (Each image has one hosting provider).
Essentially I want to be able to have my Image class look like this:
[Image]
- Id
- base_url
- filename
In NHibernate, how can I create a mapping file that will combine the base_url from the HostingProvider table, into the Image class?