Questions tagged [querydsl]

Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including JPA, MongoDB and SQL in Java.

Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including , and in .

Instead of writing queries as inline strings or externalizing them into XML files they are constructed via a fluent API.

1985 questions
0
votes
1 answer

how to treat mysql json column with queryDSL?

i want to know how to treat mysql json column. product table: ... category_ids json null, ... category_ids ex) [19, 102, 108] if i want to search list of product contains category id 102 how can i…
sb0321
  • 53
  • 1
  • 8
0
votes
2 answers

Criteria Builder and Jquery DataTables - Custom query

I'm using jquery Datatables together with Spring JPA. I want to create a custom Query so that my Datatable will show a list of items based on the id of a ManyToOne related object. PS. I have obviously declared Repositories, Mapper and Entities for…
0
votes
1 answer

I have a Querydsl question. (Feat. BooleanBuilder)

@Test void testDepartment() throws Exception { String nameParam1 = "ComputerScience"; String nameParam2 = "Department of Mathematics"; String nameParam3 = "Department of Music"; String nameParam4 = "Department of Language and…
Jaeyeon
  • 25
  • 5
0
votes
1 answer

Querydsl.JPQLQuery getting the number of records

Is there any way to just get the count of records from the JPQL query without forming the list? As when there are more number of records this will impact the performance. This is what I have done so far. Using querydsl-3.7.4 Expression[]…
Joel George
  • 62
  • 2
  • 12
0
votes
1 answer

Is there an ID that will uniquely group all the logs - APM Elasticsearch

When I run the command show below, I get the logs of the per each transaction made on a single activity (from start to end). GET /apm-*-transaction/_search { "size": 100, "query": { "range": { "@timestamp": { "gte":…
MarkCo
  • 810
  • 2
  • 12
  • 29
0
votes
2 answers

Query Syntax Same as MySQL with 2 parameters , is it possible?

My goal is to make a GET API CALL that I will put as dates fields and the id_product of a product and it will bring me a list with the sum as they have the introduction in the description of MySQL. Because I use JPARepository I had to make a custom…
Konstantinos K.
  • 181
  • 1
  • 9
0
votes
1 answer

Customize QType for shorten path

I'd would like to customizing a QType/Query to shorten a relationship. public class Foo { private FooBar fooBar; } public class FooBar{ private Bar bar; } public class Bar{ private String name; } Currently the search is always…
MelleD
  • 657
  • 1
  • 9
  • 23
0
votes
1 answer

mysql query dsl grammar getting one value using key value

I'm getting fno by proNo wrongly in sql query Here is my query: @Query(value = "select f.fno from files f where f.pro_no = proNo", nativeQuery = false) Integer findFno(@Param("proNo") Long proNo);
Hannah
  • 1
0
votes
5 answers

Infinite loop with onetomany / manytoone ? Spring / rest api

I chose to have a many-to-one relationship from the shelves to the warehouses! My problem is that when I add to the table with the shelves the foreign key of the table with the repositories then I get an ifnite loop with data, I tried to solve it…
0
votes
1 answer

QueryDsl JPAQueryFactory can't be found from class loader

I'm writing spring boot test code using QueryDsl API but whenever I try to run my test code the application can't find JPAQueryFactory class from the class loader. Here is the my build.gradle: plugins { id 'org.springframework.boot' version…
0
votes
1 answer

BooleanExpression if exists querydsl

How I can check is true/false to go in different scenarios? BooleanExpression exists = JPAexpression.selectOne().from(qUserJob) .where(qUserJob.user.eq(user), qUserJob.job.eq(job)).exists(); Is possible to convert BooleanExpression to boolean to…
Max
  • 253
  • 2
  • 16
0
votes
1 answer

Query dsl - How to write having clause

I am new to Java and Querydsl. I have searched so much to get how to write the below query in query dsl. end up with nothing.Can any one please help. SELECT * FROM `library_user_product` GROUP by user_id HAVING max(product_id) Thanks in advance
Navas P
  • 3
  • 1
0
votes
2 answers

java Spring RestController error 404 or problem configuration and bean service

When I do not use @CompomentScan my program does not get any error, but it shows me error 404 and I can not see any rest call from the postman. When I use compoment scan I get the following error, what should I do to make my program work? Im very…
Konstantinos K.
  • 181
  • 1
  • 9
0
votes
1 answer

JPA querydsl join other database?

i have two data base connection in project Ex. test1 test2 test1 database has user table and test2 database has classmember I was already settings multiple databases in jpa configuration. There are created each database table. Jpa querydsl…
joshua.kim
  • 373
  • 3
  • 11
0
votes
1 answer

How to use QueryDsl with @PrimaryKeyJoinColumn?

I want to create a querydsl Predicate to use it with spring-jpa CrudRepository. Problem: I have an optional @PrimaryKeyJoinColumn that references to the child entity by @Id PK. And I want to select only the rows where the child table does not…
membersound
  • 81,582
  • 193
  • 585
  • 1,120