This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Property versus Field based Persistence

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All ,


Reference : EJB3.0 in action (Manning)

I am trying to understand the follwoing line



Annotations used with a setter method are ignored by the persistence provider for property-based access.



Any ideas ?

I under stand that the foolowing code also from the same book is Property based persistence

 
Ranch Hand
Posts: 329
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Akhil Maharaj:

I am trying to understand the follwoing line

� Annotations used with a setter method are ignored by the persistence provider for property-based access. �



Annotations should be applied to the getter methods when using property-based access. If you apply an annotation to a setter method, the annotation is ignored by the persistence provider.


Originally posted by Akhil Maharaj:

I understand that the foolowing code also from the same book is Property based persistence



Your code is using field-based access. Note that the @Id annotation (the only required annotation) is used on a field and not on a getter method of a property.
[ October 08, 2008: Message edited by: Sergio Tridente ]
 
Ranch Hand
Posts: 270
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Akhil,

I think Sergio cleared your doubt. I was in same confusion when i started that chapter but if you just turn few pages you will understand that concept.
if you still have doubt do post here i will try to clear.

Regards,
Sudhakar
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic