spring-data-jpa-datatables-sample
spring-data-jpa-datatables-sample copied to clipboard
Searching in column of reference table
public class Employee { @Id private int id; private String firstName;
@ManyToMany(cascade = CascadeType.ALL)
@JoinColumn(name = "id_office")
private Set<Office> office = new HashSet<>();
}
class Office {
@Id @GeneratedValue private int id;
private String city;
}
Considering above declaration of classes, how to implement Advance section of the given datatable example.
Advanced searchpanes section -
how to implement the following,
$('select#officeSelector').change(function() { var filter = ''; $('select#officeSelector option:selected').each(function() { filter += $(this).text() + "+"; }); filter = filter.substring(0, filter.length - 1); table.column(7).search(filter).draw(); });