darrachequesne / spring-data-jpa-datatables

Spring Data JPA extension to work with the great jQuery plugin DataTables (https://datatables.net/)
Apache License 2.0
447 stars 173 forks source link

QueryDSL Support #4

Closed efriandika closed 8 years ago

efriandika commented 8 years ago

Please add support to query DSL :dancer:

darrachequesne commented 8 years ago

Hi! Thanks for your interest. Would a method like that suit your needs?

DataTablesOutput<T> findAll(DataTablesInput input, com.mysema.query.types.Predicate predicate);
efriandika commented 8 years ago

Yes.. that's right.. :D Thanks @darrachequesne

olc-olivier commented 8 years ago

Hi,

Do you think it is possible to map nested object, deeper ?

Ex:
class A B b

class B Set translations

class Tranlsations Name

inputdatatable: column name : b.translations.name.... for a global filter search... with or/and parameter

I could do that if I choose a conditional parameter with additionalSpecification.

Specifications.where(new DataTablesSpecification(input)) .and(additionalSpecification), getPageable(input)); To Specifications.where(new DataTablesSpecification(input)) .or(additionalSpecification), getPageable(input));

darrachequesne commented 8 years ago

Hi! @efriandika version 2.0 is out with QueryDSL support. I've updated the docs (with QDataTablesRepository) and will publish an example if I find some time.