-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate Annotations - Without getters - help!!!
PostPosted: Wed Dec 10, 2008 6:43 am 
Newbie

Joined: Wed Dec 10, 2008 5:10 am
Posts: 4
Location: India
I am new to hibernate. I have tried out a couple of examples with hibernate core. Now I am trying to do the mapping using annotations but i don't want to expose my private variables by having getter methods.

How can i map the variables of a class without having getter method?

Thankyou very much for taking time to read this. It would be nice if i could get an answer.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2008 4:52 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Annotate the fields.

@Id private Long id;

This is in the Hibernate Annotations manual...

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
 Post subject: thank you so much!!!
PostPosted: Sat Dec 13, 2008 9:27 am 
Newbie

Joined: Wed Dec 10, 2008 5:10 am
Posts: 4
Location: India
:-)


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