JHipster: Filtering entities with criteria - intended Angular client-side approach

前端 未结 1 857
春和景丽
春和景丽 2021-02-09 07:27

I\'ve recently started using JHipster - thanks to the maintainers for this fantastic project!

In the current version of JHipster (4.10.2 at the time of writing), entitie

1条回答
  •  失恋的感觉
    2021-02-09 08:26

    I've done very similar thing in my projects too, in my solution the criteria is used like this:

    let criteria = {
       'name.equals' : 'Optimus',
       'power.equals' : '10'
    };
    

    Currently, I work on an 'auto-complete' field, which will use the criteria, and has the necessary extension to the request-util.ts. Here: https://github.com/jhipster/generator-jhipster/pull/6618

    And yes, I think, that parameters of that 'query' method is bit confusing, it need to be be simplified a bit.

    Maybe, we can generate a client side version of the 'EntityCriteria.java', as 'entity-criteria.ts', but I'm not sure. There is a constant push against new features, and less code, which I could understand.

    0 讨论(0)
提交回复
热议问题