-->
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.  [ 3 posts ] 
Author Message
 Post subject: Unidirectional @OneToOne
PostPosted: Thu May 10, 2007 8:56 am 
Beginner
Beginner

Joined: Sat Apr 07, 2007 4:42 pm
Posts: 24
Hi,

I have this:

Code:
class A {
  @Id private int id;
  @OneToOne
  private B b;
  ...
}

class B {
  @Id private int id;
  ...
}



This creates Table A and B with a FK column in A which points to B.

Is it possible to put the FK into B without having a reference in class B to class A?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 14, 2007 12:25 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
no

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 14, 2007 1:47 pm 
Beginner
Beginner

Joined: Sat Apr 07, 2007 4:42 pm
Posts: 24
Thank you!


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

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.