Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on updattable and insertable params

 
Joe Harry
Ranch Hand
Posts: 10091
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is is mandatory to specify updatable and insertable parameters for Primary key fields?

@Column(name="USER_ID", insertable=false, updatable=false)
protected Long userId;
 
Sergio Tridente
Ranch Hand
Posts: 329
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic