These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Logical problem creating nhibernate mappings
PostPosted: Fri Aug 15, 2008 5:30 am 
Newbie

Joined: Mon Aug 11, 2008 4:54 am
Posts: 4
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.