I use java and avaje ebean 2.8.1. I want do specific query for a method. For Example: select * from children where removed=false order by born_date

@Entity 
public class Client {
    @Id 
    private Long id; 

    @OneToMany 
    private List<Child> children; //this return all, include removed=true

    public List<Child>  getChildren(){
        return children;
    }
有帮助吗?

解决方案

Take a look at the @Where annotation, it's still valid in 2.8.x

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top