I am developing web application with spring mvc and Data sent to client in json format. I want to have some views of same model object thus i can return only needed data ,not more.Jackson library @JsonIgnore , @JsonIgnoreProperties not suit this .Jackson library have also @JsonView and @JsonFilter annotations but they didnt help too.How can handle this problem.For example ,i will need possibleTarget list in some pages of UI and sometimes dont need.This is the same question but answer not help me
@Entity
public class Warrant implements Serializable {
@Column
String name;
@JsonIgnore
@ManyToOne
private User owner;
@Column
private String value;
@OneToMany(mappedBy = "warrant", targetEntity = com.endersys.lims.model.Target.class)
private List<Target> possibleTargets;
.....
}