JPA Persistence fields

Report a typo

Here is a table and the corresponding entity:

Email table diagram

Java
@Entity
public class Email{

    // 1
    private String content;

    // 2
    @Column(name = "label")
    private String emailLabel;

    // 3
    @Column(name = "main_subject")
    private String subject;

    // 4
    private boolean important;
}
Kotlin
@Entity
class Email {
    
    // 1
    var content: String? = null

    // 2
    @Column(name = "label")
    var emailLabel: String? = null

    // 3
    @Column(name = "main_subject")
    var subject: String? = null

    // 4
    var important: Boolean = false
}

Match the table columns with the corresponding entity fields.

Match the items from left and right columns
1
2
3
4
important
label
content
main_subject
___

Create a free account to access the full topic