This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes is field or property based annotation same Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "is field or property based annotation same" Watch "is field or property based annotation same" New topic
Author

is field or property based annotation same

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I read there are 2 ways to use annotatin in EJB 3.
field based anotation which we annotate instance variables.
Property based annotation is annotate getters.
Anyway my prblem is that getters returns the values of instance variables.
then why we use 2 ways?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9951
    
161

There's a good explanation about it here


[My Blog] [JavaRanch Journal]
 
Don't get me started about those stupid light bulbs.
 
subject: is field or property based annotation same
 
Similar Threads
Annotations on instance declaration or get method using JPA in entities?
The difference between field-based access and property-based access
AccessMode in JPA 2
Enthuware question com.enthuware.ets.scbcd.v5.2.79
Use annotation on attribute of a POJO and use that annotation as identifier for logical check