-->
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: Annotating both fields and properties
PostPosted: Tue Oct 02, 2007 11:14 am 
Newbie

Joined: Tue Oct 02, 2007 11:09 am
Posts: 2
Hi

When using JPA with Hibernate is it possible to annotate both fields and properties in a single entity. If yes do we need to use some special annotation or code to make that happen or does Hibernate do that automatically

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 03, 2007 11:30 am 
Beginner
Beginner

Joined: Tue Jun 27, 2006 6:14 am
Posts: 24
My understanding is that you can only do one or the other and its driven by where you put the @Id, if its on a field, then it looks at the other fields. If its on a property accessor, it assumes all "get" methods are to be persisted.

HTH,
Chris


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.