You could add a set of conditions to “ignore” properties with null values or empty strings.
e.g.
+ " AND (ord.quoteNumber = :quoteNumber or :quoteNumber is null or :quoteNumber="" ")
More Related Contents:
- JPA EntityManager: Why use persist() over merge()?
- JPA 2.0, Criteria API, Subqueries, In Expressions
- When use getOne and findOne methods Spring Data JPA
- Create JPA EntityManager without persistence.xml configuration file
- Spring Data JPA And NamedEntityGraphs
- How to persist JSR-310 types with Spring Data JPA?
- Is it possible to output generated SQL using EclipseLink without having to increase log verbosity?
- JPA passing list to IN clause in named native query
- Spring batch jpaPagingItemReader why some rows are not read?
- JPA 2.0 native query results as map
- kotlin data class + bean validation jsr 303
- JPA transient information lost on create
- How do I do a “deep” fetch join in JPQL?
- Testing an EJB with JUnit
- Spring Data JPA and Querydsl to fetch subset of columns using bean/constructor projection
- JPA utf-8 characters not persisted
- JPA Criteria API group_concat usage
- How do I count the number of rows returned by subquery?
- Difference between FetchType LAZY and EAGER in Java Persistence API?
- Why is Hibernate Open Session in View considered a bad practice?
- JPA: How to have one-to-many relation of the same Entity type
- How to start spring-boot app without depending on Database?
- JPA: Implementing Model Hierarchy – @MappedSuperclass vs. @Inheritance
- How to prevent SQL Injection with JPA and Hibernate?
- Specifying an Index (Non-Unique Key) Using JPA
- Hibernate: Create Mysql InnoDB tables instead of MyISAM
- Disable caching in JPA (eclipselink)
- inverse=true in JPA annotations
- database sort vs. programmatic java sort
- LazyInitializationException in JPA and Hibernate