We are nesting several entities. However upon retrieving we only want to get those entities which are active.
@Entity
public class System {
@Id
@Column(name
Another hibernate way of doing it with @Where:
@Entity
public class System {
@Id
@Column(name = "ID")
private Integer id;
@OneToMany(mappedBy = "system")
@Where(clause = "active = true")
private Set systempropertys;
}
@Entity
public class Systemproperty {
@Id
@Column(name = "ID")
private Integer id;
@Id
@Column(name = "ACTIVE")
private Integer active;
}