NHibernate version: 1.2.0 Beta 3
Mapping documents:
Hello Everybody,
I have an interesting mapping challange, that i think nhibernate should be able to handle, but i have failed to create mapping that does.
I have a database model, which looks like this:
I have a domain model, which id like to look like this:
The ContactInfo class contains businesses' or people's contact information (E-mail, ICQ, Phone numbers etc.) Therefore, the Business and Person objects should have a list of ContactInfo-s.
The mapping should be based on the "ContainerId" column in `Business` and "ContainerId" in `ContactInfo`.
Is it possible to do this without creating a ContactInfoContainer class in the domain model? I am not particularly interested in changing the database structure (i.e. removing the `ContactInfoContainer` table and using a discriminator column in the `ContactInfo` table instead.)