2.11.20190113153635
Version: 2.11.20190113153635
Nested Filters
Typical filter patterns like /tasks?filter[name][EQ]=Super task` work well for most use cases. This release brings further support for complex, nested filters through JSON. It allows arbitrary nesting of AND, OR and NOT expressions. For example:http://127.0.0.1:8080/projects?filter={"OR": {"name": "Great Project", "LE": {"id": 122}}}More information is available in the documentation.
Revised JPA Setup
The JPA module has a long history with being the first module of Crnk. For this reason it has shown a bit its age and other places evolved quite a bit in the meantime. This release comes with a simplified, improved setup. Instead of configuring the JpaModule itself, the application can specify repositories extending from JpaEntityRepositoryBase:@Component public class ScheduleRepositoryImpl extends JpaEntityRepositoryBaseThe JPA module will detect those repositories and make them work like in the past with more explicit configuration. The new setup has a number of advantages:{ public ScheduleRepositoryImpl() { super(ScheduleEntity.class); } }
- It is a regular repository like any other. In case of Spring Boot you can, for example, inject it anywhere you like as it is a managed bean.
- It makes use of the forwarding repository behaviors (see @JsonApiRelation) to forward relationship calls to either side. So in case of customizations, only the resource repositories have to be customized, the relationships will follow automatically.
- Having a repository at hand allows to do any kind of customizations without having to rely on decorators.