Hello, i have a logical problem generating nhibernate mapping files.
I have the following DB structure ( its not mine, i need to use it)
Code:
create table adress
id primary key
name varchar .....
create table contacts
id primary key
adressid fk to adress
type varchar....
create table communication
id primary key
adressid fk to adress
contactsid (if 0 then belongs to adress, else belongs to contacts)
The Table communication contains emails, telephonenumbers etc. They can belong to the primary adress or to a contact from the primary adress. If the field contactsid is 0 the commincation row belongs to the primary adress, else it belongs to the contact of the primary adress. How/can i map such a structure with nhibernate?
Hibernate version: 2.0 Beta1
Name and version of the database you are using: Firebird 2.1
Michael