Error While Creating Entities in Spring boot application

Viewed 103

I have been trying to create an entity in my spring application that inherits the contents of other class. I wanted the fields of the inherited class to persist in the database but all in vain. I am using Lombok as well. Am I doing something wrong here?

Child class:

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor

public class UserDetails extends Users{

@Id
Long uId;

String description;

String postalAddress;

Long postalCode;

}

Parent class:

public class Users {

Long userId;

String username;

String email;

String password;


 }
1 Answers
Related