Questions tagged [query-by-example]

97 questions
4
votes
2 answers

How to configure query by example to include null values?

I have the following matcher: Example.of( user, ExampleMatcher.matching() .withMatcher("name", contains().ignoreCase()) .withMatcher("phoneNumber", contains()) ) It works fine except null values. For…
Utku
  • 2,025
  • 22
  • 42
4
votes
1 answer

Are there any possible ways to ignore all paths of JPA Example Matcher

I'm new to Spring JPA. I has two questions about Example and ExampleMatcher API. Are there any ways to ignore all paths except some paths which I set matchers. Or are there any ways to ignore all paths if Example object's path has null value. It…
Jin
  • 43
  • 1
  • 4
4
votes
1 answer

Spring Query By Example using "OR"

I have a JPA entity that has two attributes to search by "OR" operator instead of "AND". Those are ledgerCode and division: Company comp = new Company(); ExampleMatcher matcher = …
Robson Braga
  • 323
  • 4
  • 16
4
votes
4 answers

HibernateTemplate findByExample returns no results

I'm trying to use Hibernate QBE (actually, Spring's HibernateTemplate.findByExample() ) to return a list of users by their username. I use a "known good" value to search on (the username "JOHN.SMITH" does exist in the database). Unfortunately, I get…
Jason
  • 3,943
  • 12
  • 64
  • 104
3
votes
1 answer

How can I replace using Query by Example in Spring Data JDBC?

In my view I send async request to controller with Json Data as following: { "filters":{ "someField":"someValue", "someField":"someValue", "someField":null, "someField":null, } } But data can be different. And I have…
3
votes
2 answers

How to secure Hibernate QBE query

By the moment, I know four kinds of doing transactions with hibernate: Using objects Using HQL Using DB-specific SQL Using criteria (QBE) Well, regarding how strong are they against injections, I think these are (correct me if I'm wrong): Secure,…
Mister Smith
  • 27,417
  • 21
  • 110
  • 193
3
votes
1 answer

spring data jpa find all by example nested collection property

I have two objects. The company that can have multiple nested addresses. @Entity @Data @Table(name = "company") public class Company { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; …
Matija Župančić
  • 1,080
  • 2
  • 11
  • 21
3
votes
1 answer

Replace Deprecated KeyValueQueryDefinition in MarkLogic to use Query By Example

I have a document saved in MarkLogic like below : Vikram password Vikram Swaminathan
Vikram
  • 635
  • 1
  • 9
  • 29
3
votes
1 answer

Mongodb QueryByExample findOne

Some other process inserts documents into mongo collection and below is the sample data { "_id" : ObjectId("597b89c8da52380b04ee6948"), "_class" : "com.test.mongo", "clientId" : "CAQ123999", "isValid" : false, "isParent" : true } { "_id" :…
PKR
  • 228
  • 2
  • 16
3
votes
1 answer

Query by Example Spring Data

I have domain object Person with date fields: public class Person { @Id private Long id; private Date date Build example like this: Person person = new Person(); person.setSomeOtherFields("some fields"); Example example =…
Wait
  • 149
  • 1
  • 3
  • 12
3
votes
2 answers

Scenario outlines in Xamarin Test Cloud

I try to run my calabash tests on Xamarin Test cloud - I realized that there are problems with running Scenario outlines which contains Example table. Scenario Outline: Examine Landing Page #Given I open application Then I see the button…
3
votes
2 answers

how to use drop down widget in kivy with a python class

So, I think there should be at least two ways that I could have a drop down menu on this page, but I can get neither to work. I am new to kivy and programming in general, but I have read the documentation and it seems that I simply do not…
bosky
  • 157
  • 3
  • 3
  • 7
3
votes
2 answers

Is there a good documentation of NHibernate's query by example feature?

I'm trying to find a good documentation which states exactly, what query by example is capable of and what not. In particular, I want to know, if query by example supports a search like the following: I want to get all Persons which have a location…
Oliver Hanappi
  • 12,046
  • 7
  • 51
  • 68
3
votes
2 answers

hibernate createCriteria on a FK field is not working for me

I've been stuck with this for a while and cannot make progress. The question is how to use Hibernate's createCriteria when the restrictive field in DB is a FK. Here are 2 tables: account and *cf_account_type*, which represents the qualifier…
2
votes
2 answers

How suitable is the Dynamic Time Warping algorithm, for a query by humming system?

I'm trying to develop a query by humming system and looking for an efficient algorithm to compare frequencies of hummed queries against the frequencies in the database. Seems like Dynamic Time Wrapping will be suitable as it can deal with different…