-->
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: How to refer unique columns, which are not primary keys
PostPosted: Tue Sep 05, 2006 5:44 pm 
Newbie

Joined: Mon Sep 04, 2006 7:07 am
Posts: 2
HI,

Kindly suggest me a way using hibernate annotations, to refer unique column names from some other entity.e.g

public class A implements Serializable {

private String id; // this is the primary key for this entity
private String columnA;
private String columnB;

// in this entity i have annotated combination of "columnA" and "columnB" as unique
}

Now i want to refer "columnA" and "columnB" from some other entity, lets say, "EntityB", through annotation. Kindly suggest me some optimized way for doing the same.

Thanks

_________________
Regards,
Gautam


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.