Pregunta

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;
    }
¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top