Question: [ 9 : 2 3 am , 1 4 / 5 / 2 0 2 4 ] Pallavi: Refer the following code for a Java
: am Pallavi: Refer the following code for a Java class.
package com.mphasis:
import javax.persistance. Entity:
import javax.persistance GeneratedValue;
import javax.persistence. GenerationType
import javax.persistence.Id;
code goes here
public class Customer
code goes here
code goes here
private Long id;
private String firstName;
private String lastName;
Setters and Getters
Which of the following lines of code when added to Lines and will enable mapping of the Java class with the database using JPA where the id field is managed by JPA during generation of records?
: am Pallavi: O
A
@Table
@Id
GeneratedValuestrategy GenerationType. AUTO
B
@Entity
@id
@GeneratedValuestrategyGenerationType.AUTO
C@Table
@ Identity
@GeneratedValue strategyGenerationType AUTO
D@Table
@Id
AutoGenerated strategy GenerationType AUTO
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
