@Bean(scope = DefaultScopes.SESSION)
public JsfCrudAdapter petClinicLeadCrud() throws Exception {
/* Pull out the existing CrudAdapter. */
JsfCrudAdapter adapter = cruds().get("PetClinicLead");
/* Grab its filtering paginator and configure it. */
FilterablePageable paginator = adapter.getPaginator();
/* Call addFilterableEntityJoin padding the class we are joining to,
* the name of the entity, the name of the alias,
* an array of property names, and an optional join that will be added to the where clause.
*/
paginator.addFilterableEntityJoin(PetClinicInquiry.class, //Class we are joining
"PetClinicInquiry", //Entity name
"inquiry", //
new String []{"anotherProp"}, //Array of property names we want to join to.
"o.inquiry"); //How to join to the PetClinicLead
paginator.filter();
return adapter;
}