Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
139 views

Too many unwanted SQL queries calls from Mybatis implementation in Spring boot Java

Before starting I want to clarify that I use Oracle, MyBatis and Springboot Java in my API. One of the solutions I applied was to increase the lifetime of my Oracle session to 12h to avoid this ...
Olivetz's user avatar
  • 13
0 votes
0 answers
61 views

Why does appending an extra “#” to my Oracle common user fix the login issue?

I'm encountering a very bizarre problem with an Oracle database connection in a Java API from a teammate. The application runs fine for everyone else, but on my machine and in the machine from just ...
Felipe Teixeira's user avatar
0 votes
0 answers
24 views

How to use auto-generated ID in multiple INSERT statements within single MyBatis insert tag?

I want to implement the following functionality in MyBatis: Execute two INSERT queries with a single insert tag Use the auto-incremented ID (id1) generated from the first INSERT in the second INSERT ...
doubled's user avatar
1 vote
1 answer
31 views

MyBatis annotation function where IN list of uuids

I have a list of UUIDS of users where I need to decrease a number of gold by a given amount. MyBatis function: @Update( """ UPDATE users SET gold = gold - #{amount} <...
Vetalll's user avatar
  • 3,701
0 votes
0 answers
52 views

MyBatis insert returns without exception, but the database is not updated even though I have called commit()

This is my first attempt at an insert with MyBatis, so I'm assuming I've missed some vital step or other! I'm attempting a fairly simple insert into an sqlite database: <insert id="insertClub&...
Paul Hunnisett's user avatar
0 votes
1 answer
53 views

Insert Java boolean into Postgresql boolean via Mybatis

I fail to insert a java boolean into a postgresql boolean column via mybatis. I get the below error. Why does it think 'expression is of type integer'? It's all boolean. org.springframework.jdbc....
Peter's user avatar
  • 1,206
0 votes
0 answers
41 views

MyBatis3 There is no setter for property named '1' in 'class java.lang.String'

I have a problem, I need to query all the data by the table name, but recently found a problem, I reported an error when querying a customer table. Cause: org.apache.ibatis.reflection....
Levin Xiao's user avatar
0 votes
1 answer
55 views

MyBatis fails on one-to-many relationship with TooManyResultsException: Expected one result ... but found: 2

I have two classes which are, for now very simple: class Club { private int id; private String name; private Set<Player> players; } class Player { private int id; private String ...
Paul Hunnisett's user avatar
-1 votes
1 answer
31 views

Spring fails bean creation from unspecified package

I've created an artifact "MyElectricity-aWattar" which deals with a MariaDB database on behalf of MyBatis. It works fine. The is also another artifact "MyElectricity-Sungrow" which ...
Ulrich's user avatar
  • 723
0 votes
1 answer
55 views

Use Collection of Pairs For Insert Statement?

I have a table with a compound primary key, and I want to do a bulk insert for all keys (data migration/staging). Currently it looks like, if you pass a collection to a MyBatis insert, it expects all ...
Patrick Proctor's user avatar
0 votes
0 answers
29 views

Can I use sql phrase that "alter session [session id] stop grace" in mybatis mapper?

I use update tage in mybatis mapper. <update id="stopSessionGracefully" parameterType="com.project.dao.dto.StopSessionReqDaoDto"> ALTER SESSION #{sessionId} STOP GRACE &...
최서진's user avatar
0 votes
2 answers
77 views

MyBatis handler Issue in my Spring Boot Example for Map Object

I have a problem to implement custom handler for Map through MyBatis in my Spring Boot example. Here is my request object shown below @Getter @Setter @NoArgsConstructor @AllArgsConstructor public ...
Sercan Noyan GermiyanoÄŸlu's user avatar
0 votes
1 answer
110 views

Verifying transaction rollback in spring-boot integration test

I am trying to write an integration test that verifies database rows are rolled back if one of the operations in a transaction fails. However, though I see the rollback being triggered, my database ...
Sydney's user avatar
  • 13
1 vote
2 answers
63 views

ExecutorService Callable thread mybatis insert 1M+ records throws CannotGetJdbcConnectionException Failed to obtain JDBC Connection

Below is Hikari connection settings spring.datasource.hikari.connection-timeout=600000 spring.datasource.hikari.idle-timeout=300000 spring.datasource.hikari.max-lifetime=1800000 spring.datasource....
Pat's user avatar
  • 633
0 votes
1 answer
37 views

How to make spring JPA auto conversion similar to mybatis

In mybatis : Column conversion will happen automatically for columns in select: Ex : I have a select query with only 2 columns. but i want to map this 2 columns into en entity which is common to a ...
Ram gautam G's user avatar

15 30 50 per page
1
2 3 4 5
…
229