-->
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: PB : association with only the key, not the object ???
PostPosted: Fri Oct 20, 2006 12:52 pm 
Newbie

Joined: Thu Oct 05, 2006 11:54 am
Posts: 2
Hello,

I got a big problem that is very simple, but very hard to solve :
- suppose I have a class A, a class B, and an association beetween A and B

Shortly, the database model is :

-------------
table A :
-------------
int x
int y
long B_id
-------------
alter table A add constraint FK0 (B_id) references table B

-------------
table B :
-------------
int z
-------------

My problem is about the object model :
actually, for many specific reasons, I would have such an object model

class A {
int x;
int y;
int B_id;
}

And not the following model :

class A {
int x;
int y;
B z;
}


Has anybody an idea of how to realize that ?

Thanks a lot,

Best regards,
Steve


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.