Our great sponsors
-
kotlin-jpa-specification-dsl
This library provides a fluent DSL for querying spring data JPA repositories using spring data Specifications (i.e. the JPA Criteria API), without boilerplate code or a generated metamodel.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I have written some utility functions for composing Specifications in a nicer and safer way, inspired by how QueryDSL composes Predicates. I created a PR in attempt to merge it directly to Spring Data JPA itself (https://github.com/spring-projects/spring-data-jpa/pull/404), but unfortunately it was rejected because the Spring team plans to majorly rework Specifications in the near future (https://github.com/spring-projects/spring-data-jpa/issues/1943#issuecomment-752504333). Feel free to copy the code in my PR for your own use.
If you are using Kotlin, kotlin-jpa-specification-dsl provides a very convenient way to generate Specifications from KPropertys.
Related posts
- speed of a left join with millions of rows
- How to write a native query in spring boot jpa(postgres) which has "where in" check on composite columns?
- Return a nested list of child table using Kotlin Exposed Dao
- Replicating Jetbrains Exposed Star Wars Example in IntelliJ Scratch file
- What does @Transactional keep you from needing to call .save()?