You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
First of all, thanks for wonderful spring based solution for datatables.
Can you please provide an example for below situation.
Suppose I have OnetoMany relation in Employer/Employee.
What if I want to show all employees related to one employer only using employer id?
How do I configure Specification additionalSpecification with Employer id as PathVariable/Get Param? for example /abc/employees/{employerId} or /abc/employees?id=12312
Can we set employer Id each time request is sent to server in case of search and pagination?
I have many such cases in which a datatable need to be shown on page load.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
and then apply your filter on that hidden column. Of course, in that case, the client has the control over the employerId sent to the server. If you want to apply it on the server-side:
publicstaticSpecification<Employee> withEmployerId(IntegeremployerId) {
return (root, query, criteriaBuilder) -> {
returncriteriaBuilder.equals(
root.join(Employee_.employer).get(Employer_.id),
employerId);
};
}
// not tested, but that should work!
Hi,
First of all, thanks for wonderful spring based solution for datatables.
Can you please provide an example for below situation.
Suppose I have OnetoMany relation in Employer/Employee.
What if I want to show all employees related to one employer only using employer id?
How do I configure Specification additionalSpecification with Employer id as PathVariable/Get Param? for example /abc/employees/{employerId} or /abc/employees?id=12312
Can we set employer Id each time request is sent to server in case of search and pagination?
I have many such cases in which a datatable need to be shown on page load.
Thanks in advance.
The text was updated successfully, but these errors were encountered: