• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@joincolumn updatable false

 
Vivian Josh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I am bit confused about the meaning of "updatable" and "insertable" in @joinColumn annotation.

Suppose I have something like this in my entity called "Player" (player_table):

public class Player implements Serializable{

@ManyToOne(....)
@JoinColumn(name = "user_id", referencedColumnName = "some_other_id", updatable = false, insertable= false)
private USER user;

}

So does this mean I can not update user_id from player table or I can not use user_id in "where clause" while updating record in player table ?

Thanks for you help.


 
Vivian Josh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any ideas ?

No replies
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic