Complete the business object

Report a typo

Select the annotation that defines a database table called Users for the User object.

Java
package com.example.demo2.businesslayer;

import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;

@Entity 
___________________
public class User {
	
    @Id
    private long id;

    @Column(name = "username")
    private String username;

    @Column(name = "firstName")
    private String firstName;

    @Column(name = "lastName")
    private String lastName;
	
    public User() {
		
    }
	
    public User(long id, String username, String firstName, String lastName) {
        this.id = id;
        this.username = username;
        this.firstName = firstName;
        this.lastName = lastName;
    }

    // getters and setters
}
Kotlin
@Entity
______________________
class User(
    @Id
    var id: Long = 0,

    @Column(name = "username")
    var username: String? = null,

    @Column(name = "firstName")
    var firstName: String? = null,

    @Column(name = "lastName")
    var lastName: String? = null
)
Select one option from the list
___

Create a free account to access the full topic