aspose file tools*
The moose likes Object Relational Mapping and the fly likes Private fields in Field based persistence JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Private fields in Field based persistence JPA" Watch "Private fields in Field based persistence JPA" New topic
Author

Private fields in Field based persistence JPA

Sandhya Gutha
Greenhorn

Joined: Jul 28, 2011
Posts: 2
Hi,

I have a question regarding "Field based persistence in JPA"
I was going through Field bases persisetnce concept in EJB 3 in action book. It says that "declare all data fields public or package protected" in field based persisetnce.
what happens to the private instance variables/fields. Are they persisted to the database, if Field based access is used..
If private variables are not persisted, then why do we need @Transient annotation.

Thank you,
Sandhya

James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
JPA can persist private fields.

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Private fields in Field based persistence JPA