-->
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.  [ 2 posts ] 
Author Message
 Post subject: Using @ForeignKey with @Embedded
PostPosted: Mon Sep 29, 2008 4:17 am 
Newbie

Joined: Tue Mar 21, 2006 5:22 am
Posts: 5
Hello,
is there possibility how to change foreign key names apart from @ForeignKey annotation? @ForeignKey is good solution but not for this case:

Code:
public class BussinesValue {
  @ManyToOne(optional = false)
  @JoinColumn(name = "avail_level_id", nullable = false)
  @ForeignKey(name = "avail_level_fk")
  private AvailabilityLevel availability;
  ...
}


Code:
public class Asset {
  @Embedded
  private BussinesValue value;
  ...
}


Code:
public class AssetGroup {
  @Embedded
  private BussinesValue value;
  ...
}


Then will be duplicate foreign key names in database...

I use Hibernate 3.3.1 with JPA.

Thank you in advance,
PETER


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 03, 2008 8:36 am 
Newbie

Joined: Tue Feb 05, 2008 11:35 am
Posts: 10
We have the same problem.
Probably a feature request should be created...

BR:
Norbi


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.