Questions tagged [query-by-example]
97 questions
0
votes
1 answer
Error while trying to inject ExampleMatcher
I'm using Query by Example to implement a number of
complex filters in my Spring Boot application.
I use an ExampleMatcher to define how the String properties must be handled. So I have a code similar to the one bellow in several different…

Jefferson Lima
- 5,186
- 2
- 28
- 28
0
votes
1 answer
Real use cases / examples to show the need to query on predicate in a dataset
I would like to ask your insights about the real world use cases or examples that why we need to query on predicate in a dataset without specifying other elements (e.g., the value of subjet, the value of object) in the query.
The objective is to…

Artemis1216
- 25
- 4
0
votes
2 answers
Spring+boot+data - query by Example having association return Page
I have an Employee entity class with Job entity mapped. In a controller I want to return all employees who have the job with the given Job description. How i do it? Currently my code returns empty list.
here is my code
public class Employee {
…

Alex
- 483
- 1
- 12
- 23
0
votes
0 answers
Does Hibernate query-by-example ignores restrictions which require a join?
I have a relationship between a Parent(@OneToMany mappedBy) and its Children(@ManyToOne). When I use try to use QBE to retrieve the Child(ren) based upon the Parent(s) I always get back the full list of Child(ren).
I've attached the sources for a…

Pooh
- 11
- 1
0
votes
2 answers
confusion with example explanation of Prototype pattern in c++
Some one posted the questions about this pattern but not having the solution of the question raised in my mind so posting with the queries i have...
In above example if all the instance are initialized by s_prototypes variable, and next time if any…

ssg
- 247
- 2
- 15
0
votes
1 answer
Hibernate- Disjunction with criterion.Example in QBE
I want to search my database with a criterion.Example on multiple fields, OR'd together. That is, I want to retrieve records in which "field1" is an example of my search object OR "field2" is an example of my search object, where field1 and field2…

DFL
- 173
- 1
- 14
0
votes
1 answer
ios Custom annotation view using storyboard in MapKit
I'm trying to add a custom annotation view in mapkit . When I tap on red annotation pin , I got an annotation callout,but it is very simple.I want to add a custom view which I have made in the storyboard.
Can you please provide me a video or text…

Shashwat Tyagi
- 255
- 5
- 15
0
votes
0 answers
delta_import from MongoDB to SOLR in Windows
I am new to SOLR & successfully managed to made full-import from mongoDB to SOLR in windows but when i tried to perform delta-import it was not done and there is no log information also found can any suggest me to complete delta import from mongoDB…

skckhan
- 1
- 1
0
votes
1 answer
Hibernate Criteria by Examle
I am trying to create Criteria by an Example. But I am getting the same results for the different Example objects.
Author author = new Author();
author.setId(3L);
News news = new News();
news.setAuthor(author);
List newsList =…

Nox
- 191
- 1
- 11
0
votes
1 answer
Using disjunction on a QBE
Is it possible to use disjunction on criteria Example?
I've tried to use Example to filter some data.
Criteria critFatura = ((Session)em.getDelegate()).createCriteria(Fatura.class);
…

gravatasufoca
- 37
- 1
- 8
0
votes
0 answers
Hibernate QBE doesn't work as expected
Here is the method I wrote
public static List selectOnCriteria(SessionFactory sessionFactory, int maxResults, T model)
{
List resultList=null;
session=sessionFactory.openSession();
…

Dipanshu Verma
- 459
- 3
- 8
- 22
0
votes
1 answer
Applying multiple "or" filters using Query by Example
I'm trying to retrieve a set of records from Active Directory using Query by Example. This snippet will find any records with the name of "John Smith":
PrincipalContext context = new PrincipalContext(ContextType.Domain, contextName);
User filter =…

John Trenwith
- 753
- 6
- 10
0
votes
1 answer
How to get following result for my SQL?
My Employee Table
EMPLOYEEID, EMPLOYEENAME
My CallReportEmployee Table
ReportID, EMPLOYEEID
My Report Table
ReportID , ReportName
When I want to get is I want to show all the employee name, when those didnt choose ReportID 1
1 report can consist…

Ryan
- 155
- 1
- 5
- 19
0
votes
2 answers
How to get all word permutaions using hibernate?
I want to create a hibernate query using hql or criteria to get all permutations of a word, for the word elepahant i want to get:
eliphant
ilephant
iliphant
elefant
at first i assumed that "%" + "elepahant" + "%" could do the work but in fact it…

Eslam Hamdy
- 7,126
- 27
- 105
- 165
0
votes
1 answer
NHibernate - Query by Example - Subquery
I know there are MANY ways to achieve the following in NHibernate - i am not interested in other scenarios. What I am wondering is if it is possible to automatically generate a subquery using a many-to-one relationship and a query by example in…

Jason Irwin
- 1,985
- 2
- 29
- 42