-->
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.  [ 4 posts ] 
Author Message
 Post subject: Foreign-key Constraint Naming via Annotations?
PostPosted: Fri Sep 21, 2007 1:34 pm 
Beginner
Beginner

Joined: Tue Sep 21, 2004 4:04 pm
Posts: 25
Location: Oldsmar, FL
Is Foreign-key Constraint Naming via Annotations available?

(I saw a post from 2005 that said it wasn't yet available, but hoping maybe it's implemented now.)

Hibernate (Annotations) version: 3.3.0.GA


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 4:35 pm 
Beginner
Beginner

Joined: Tue Sep 21, 2004 4:04 pm
Posts: 25
Location: Oldsmar, FL
I found it:

@ForeignKey(name = "FK_XXX_YYY")


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 3:40 pm 
Newbie

Joined: Thu Dec 28, 2006 5:24 pm
Posts: 14
I can't get @ForeignKey to work... (I am using the Oracle9Dialect.) I tried annotating both sides of the relationship, and neither seems to do anything.

Does it work for you?


Top
 Profile  
 
 Post subject: @ForeignKey doesn't work for one-to-one shared PK
PostPosted: Thu Nov 08, 2007 3:53 pm 
Newbie

Joined: Thu Dec 28, 2006 5:24 pm
Posts: 14
Alas, it didn't work for me because of the OneToOne relationship. Apparently, that is a bug. See: @ForeignKey doesn't work for one-to-one shared PK

See ANN-667 and ANN-417.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.