Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
32 views

Query is not fetching the latest data from MySQL while using FOR UPDATE clauses

I have a table which locks rows as per accountId and a lock status column having values 0 and 1. CREATE TABLE lock ( id INT(11), accountId INT(11), isLocked TINYINT(2), ); The requirement is ...
Avijit Saxena's user avatar
0 votes
0 answers
22 views

How to find a column with all values in a list as column records when the list is passed as a dynamic query argument

The member_language table contains the following columns [id, member_id, language_category] Here is an example table data structure (member_id, language_category) 1-KR 1-EN 1-CN 1-JP 2-EN 2-CN 2-JP ...
SeoJiWon's user avatar
1 vote
1 answer
178 views

Error while using Enum in QueryDSL after version upgrade to 5.0.0

I am using querydsl with mysql in my spring boot project. Previously the followring mentioned code was working fine but after the project upgrade i.e. spring boot to 3 and querydsl to 5.0.0, I am ...
Milan Paudyal's user avatar
0 votes
1 answer
48 views

How to change sql into CaseBuilder?

This is my table. Table And this is my SQL: select t1.id from demo t1 where substring(t1.id, -3) = case when (select count(*) ...
Mon1151's user avatar
0 votes
2 answers
319 views

QueryDsl is fetching all record upon join and not considering ON condition

I am trying to fetch record based on join , but it is fetching matched as well unmatched entity . Database - MySQL Data Model - Query - ClassDetail classDetail = jpaQueryFactory .selectFrom(...
Sanket Saha's user avatar
0 votes
0 answers
393 views

How to query for a co-occurence of events within elasticsearch?

I'm trying to query for a co-ocurrence of events within a specified time range but can't seem to figure out how to actually perform such a query. Consider, for example, that an excerpt of Events table ...
user20168953's user avatar
-1 votes
1 answer
915 views

MYSQL query : Lower method in sql disables my index

how can have my query be able to not differienciate between my lower and upper case column query but without using the lower method of sql? select * from User where lower(lusername)= 'abdel' i want ...
Abdel's user avatar
  • 35
0 votes
1 answer
304 views

How to use querydsl SQLExpressions with Mysql?

I'm trying to apply a mysql specific function to a querydsl definition: entity.departureDate.after(SQLExpressions.addDays(entity.departureDate, 10)) Results in generated sql: select * from mytable ...
membersound's user avatar
  • 85.1k
0 votes
1 answer
210 views

How to handle Time Durations stored in MySQL TIME field?

I ran into an issue where my MySQL Table has a field that stores a UTC Time Offset. The field is of the type TIME. This is for Legacy reasons and I cannot change the column type to a better ...
dushshantha's user avatar
3 votes
1 answer
1k views

Is there a QueryDSL representation of JSON_CONTAINS predicate?

On my MySQL database (8.0.23), I have a JSON column that is multi value indexed. I would like to use QueryDSL to query using the index with JSON_CONTAINS. I have validated that the column is indexed ...
jeffp159625's user avatar
1 vote
0 answers
345 views

How to find specific rank(order) using querydsl

I would like to work on a table grouped by users to rank by studytime sum. The table saved based on the sum of studytime is not in the original db and is created with the code below. List<...
Kai Oh's user avatar
  • 21
1 vote
0 answers
469 views

How to make a dynamic query using queryDSL when the number of parameters to be entered changes?

I want to attach an eq() conditional statement to booleanExpression using or() as much as the list length. What should I do? For example QStudyTime.studyTime.user.id.eq(rivalId).or(QStudyTime....
Kai Oh's user avatar
  • 21
1 vote
0 answers
485 views

how do i update multiple rows using Spring JPA Querydsl?

I want to make the query below into a querydsl. UPDATE goal SET next_id = CASE WHEN id = 4 then 5 WHEN id = 6 then 7 ELSE next_id END; so i wrote code... CaseBuilder conditionCase = new CaseBuilder();...
borajin's user avatar
  • 11
0 votes
0 answers
520 views

QueryDsl parse JsonArray into JsonObject before updating Json column

I'm now using MySQL 5.7.35 version. I added implementation("com.vladmihalcea:hibernate-types-52:1.0.0") into gradle, and set entity field 'data' into type 'JsonArray'. @Entity @Table(name = &...
Joon Hee Song's user avatar
0 votes
1 answer
3k views

Failed to initialize JPA EntityManagerFactory: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

My application runs properly in local environment. But in Docker(of AWS EC2) isn't working. When I docker logs my-spring-image 2021-11-09 11:10:49.793 ERROR 7 --- [ main] o.s.boot....
J. Chloe Lee's user avatar

15 30 50 per page
1
2 3 4 5
7