-->
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: natural id with annotations
PostPosted: Fri May 26, 2006 8:11 am 
Beginner
Beginner

Joined: Tue Nov 22, 2005 5:33 am
Posts: 31
I am using hibernate annotations and would like to use natural id.

It seems there is currently no support for this, since the only thing I find when I try to google it is suggestions for adding support for it.

Is there a workaround to solve this problem? Can I use hbm files for just the affected class, and annotations for the rest?

Or is there another way?


Top
 Profile  
 
 Post subject: Re: natural id with annotations
PostPosted: Sat May 27, 2006 3:28 am 
Beginner
Beginner

Joined: Sat Dec 17, 2005 1:24 pm
Posts: 42
Location: Berlin, Germany
Hi!

Sorry, I do not know anything about your primary problem, but...

emilSverige wrote:
[...]Can I use hbm files for just the affected class, and annotations for the rest?[...]


this is possible. You can mix annotations and mapping files and access classes from one definition to the other (wild speculation: I imagine, that Hibernate annotations just transfers the annotations into the internal format, resulting in the same internal data structure as classes specified in mapping files).

All the best,

René


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.