File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Doubt on updattable and insertable params Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Doubt on updattable and insertable params" Watch "Doubt on updattable and insertable params" New topic
Author

Doubt on updattable and insertable params

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9622
    
    2

Is is mandatory to specify updatable and insertable parameters for Primary key fields?

@Column(name="USER_ID", insertable=false, updatable=false)
protected Long userId;


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Sergio Tridente
Ranch Hand

Joined: Mar 22, 2007
Posts: 329

Hi Jothi,

They are optional and their default value is true. Take a look at section 9.1.5 of the java persistence specification (table 7).


SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
 
Don't get me started about those stupid light bulbs.
 
subject: Doubt on updattable and insertable params