Skip to content

Tag: java-annotations

what is the use of annotations @Id and @GeneratedValue(strategy = GenerationType.IDENTITY)? Why the generationtype is identity?

Why we are using this annotations? i need to know if this autoincrement my table id values. (GenerationType.IDENTITY) is there any other types whats actually happening when we use this annotation *Is it necessary to extend Domain abstract class?What is the use? Answer First of all, using annotations as our configure method is just a convenient method instead of coping