What feature need to be enabled for entities filtering on Jhipster?

Viewed 4659
1 Answers

If you want to enable filtering in JDL you have to:

  • Use the filter keyword
  • Your entities must use a service class or implementation.

The sample JDL below will create the filter classes for entity A:

entity A
entity B
filter * except B
service * with serviceClass

If you generate your entities through the prompts, make sure to enable Service Class and Filtering options.

As an example with a Foo entity, in your foo.component.ts, you can add keys to the query object to filter on those fields:

this.fooService.query({ 'id.equals': 953 })

JDL Docs

Entity Filtering Docs

Related