4
@JoinColumn(name = "", referencedColumnName = "", insertable = false, updatable = false) 

Why insertable = false, updatable = false are required while using JPA for creating table?

yatskevich
  • 2,085
  • 16
  • 25
Ghanshyam
  • 83
  • 1
  • 2
  • 8

1 Answers1

4

These two parameters are not required. You use them when you want JPA to prevent inserts and updates for a specific field.

Here is the relevant spec - @JoinColumn.

yatskevich
  • 2,085
  • 16
  • 25