Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on updattable and insertable params

 
Joe Harry
Ranch Hand
Posts: 10128
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