I want to select specific columns from an entity class and neglect other columns in a method. For this I can not use @JsonIgnore because in another method I want to call all the columns available in that entity class.
@Entity
@Table(name="student")
public class StudentDO {
@Id
@Column(name="studentId")
private int studentId;
@Column(name="studentName")
private String studentName;
@JsonIgnore
@Column(name="studentPlace")
private String studentPlace;
@Column(name="studentstd")
private String studentstd;
Now I want a method which gives data neglecting @JsonIgnore column and another method to give all the four columns including the column with @JsonIgnore annotation when called.
Could you please help me to solve the issue