0

I need to restrain an specific enum type (soft-delete) from a List but the clause column is inside another entity of the List Entity... Is there a way to do so?

public class Attendance extends PanacheEntity {
  @OneToMany(mappedBy = "attendance", cascade = CascadeType.DETACH)
  @Where(clause = "checklist.checklistType='CHECKIN'") //Tried this but without success
  public List<ChecklistAttendance> checklistAttendance;
}
...

public class ChecklistAttendance extends PanacheEntity {
   @JoinColumn(name = "checklist_id")
   public Checklist checklist;
}
...
public class Checklist extends PanacheEntity {
   @Column(name = "checklist_type")
   public ChecklistType checklistType;//THis is the one I need to restrain...
}
rafaelpadu
  • 1,134
  • 2
  • 6
  • 20

0 Answers0