Questions tagged [query-by-example]
97 questions
1
vote
2 answers
NHibernate QueryByExample including only certain properties
I have created a custom Property Selector to accept an array in the constructor to say which properties should be included in the search. The approach works well as long as there are no component types, but how do I deal with those? Here is an…

Shagglez
- 1,522
- 3
- 21
- 38
1
vote
0 answers
How to use QueryByExampleExecutor with spring-data-elasticsearch
I want to use QueryByExampleExecutor with ElasticsearchRepository but I am getting Exception when building SpringBootApplication.
I am using Gradle with below dependencies:
springboot 2.2.4.RELEASE
spring-boot-starter-data-elasticsearch
My…

P3arl
- 383
- 3
- 18
1
vote
1 answer
Is it possible to combine Query-By-Example with spring data method?
I have a Template class with several fields (id,name,description,created,modified....)
and can filter by created date like below:
public interface TemplateRepository extends JpaRepository {
Page…

Viet
- 3,349
- 1
- 16
- 35
1
vote
1 answer
How to use projection with Query by Example in Spring Data Jpa?
I'm trying to filter data using query by example. It's working for entities and primitives, but not for projections. Do You know if such functionality available in Spring Data Jpa?

cane
- 892
- 1
- 10
- 16
1
vote
0 answers
Data JPA. Query by Example. Can't search using Long value
I have got an entity Product
@Entity
@Table(name = "Products")
public class ProductEntity implements Serializable{
@Id
@GenericGenerator(name = "generator", strategy = "increment")
@GeneratedValue(strategy=GenerationType.AUTO)
…

Max
- 55
- 1
- 6
1
vote
0 answers
How to query a database having a composite key, which accepts queries where parts of the composite key are null in Spring JPA?
I have a webapp that uses a database with a composite key. I need to create an API which will accept the parameters of the composite key wherein each paramenter can be null.
(for eg. If all the parameters of the composite key are set as null and…

hisdudeness
- 438
- 1
- 5
- 15
1
vote
3 answers
Spring MVC Binding Request parameters to POJO fields
I want a controller with the following mapping (incomplete):
@GetMapping(/searchitems)
public @ResponseBody Page- get(Item probe)
From the Item probe parameter I want to query by example in a repository of items and return the…

hansi
- 2,278
- 6
- 34
- 42
1
vote
0 answers
Add multiple Example in criteria (Hibernate)
SchoolViewModel.java
public class SchoolViewModel {
private String state;
private String city;
private String instituteType;
//getter and setter
}
InstituteType.java
@Entity
@Table(name="REF_INSTITUTE_TYPE")
public class…

Randhir
- 324
- 3
- 10
1
vote
2 answers
Hibernate Example does not find any instance
I gota wired problem.
I use the Hibernate to find entities by Example.
Unfortunately I can not find any instance even if i got I have about 20000 entries in the Table.
My question is, how to debug this problem.
01 Puppy p = new Puppy()
02 List…

Grim
- 1,938
- 10
- 56
- 123
1
vote
2 answers
ASP.NET MVC4 Query By Example Open Source Suggestions
We're currently building a new application and part of the functionality we want to include for users is the ability to build ad-hoc querys through the web UI for reporting purposes.
e.g. The user may select the Entity1 report.
They are then able to…

Tom Miller
- 435
- 8
- 18
0
votes
0 answers
Alternative for Spring-security-saml2-core dependency as it have valnerable
I am resolving SSDLC findings and I figure out that Spring-security-saml2-core:1.0.5 dependency having some vulnerability. I want to replace this dependency in build.gradle . Also I need to change in code to avoid the related class and interface…
0
votes
0 answers
Spring Boot JPA Repository Filter + Pagination + Query By Example (QBE)
I am working on a Spring Boot Application using Java GraphQL. I have a scenario where I want to return only the Users for a specific Account ID, but I also want to be able to filter that list down even further by allowing the front-end application…

Andy Erickson
- 1
- 3
0
votes
1 answer
Is it possible to get pagable data from list of QueryByExample in JPA?
A table has multiple columns and ManyToOne relationshps to/from other tables.
To collect data, query needs to be done on multiple columns with multile values and it should be pageable.
QueryByExample works well for most of the values.
But the…

Nets
- 95
- 2
- 11
0
votes
1 answer
How to setup ExampleMatcher to find all entities where one field is ONLY null and field2 contains some substring
I've got problem from real-life scenario. I am not expert on spring boot so sorry again if that's easy question. I am using Java 17, spring boot, jpa repository and postgresql driver.
The task is:
From query paramters from url-path find all entities…

osky9913
- 1
- 2
0
votes
0 answers
Does ExampleMatcher match primarykey by default?
I'm testing my jpa codes with junit, which using ExampleMatcher.
This code should filter users with email by matching end of it.
Here's my code about domain…

momo1108
- 45
- 5