Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

@Select(""" SELECT CURRENCY_CD,COUNTRY_CD,FEE_RATE_VAL FROM FEE WHERE (COUNTRY_CD, CURRENCY_CD) IN <foreach item="currencyCd" ...
Pat's user avatar
  • 649
0 votes
1 answer
138 views

In my Spring Boot application using MyBatis for SQL queries I am having trouble inserting a blob type to MySQL: Model.java public class Model { private Integer id; private Blob contentblob; public ...
Generic Mail's user avatar
0 votes
0 answers
33 views

How do I run multiple queries for a delete: @Delete( """DELETE FROM punch_attachment WHERE tablename = '${tableName}' AND recordid = #{id}; DELETE FROM ...
mikeb's user avatar
  • 11.5k
1 vote
1 answer
29 views

Employee Class Long id: String Name; I have list of Employee object and i need to get the details from Employee table filtered with both id and name. I tried something like this <resultMap type=&...
Pat's user avatar
  • 649
0 votes
0 answers
41 views

Looking at the MyBatis docs for building entities which themselves contain lists of other entities, the following SHOULD work unless I'm misunderstanding (completely possible), but it results in ...
Patrick Proctor's user avatar
0 votes
2 answers
118 views

I've got a Postgres table with an integer column and a MyBatis bean with a Boolean type. val damaged: SqlColumn<Boolean> = column("damaged", JDBCType.TINYINT) I have columns defined ...
mikeb's user avatar
  • 11.5k
0 votes
0 answers
52 views

Using mybatis batch session template to copy data from a table having millions of records to another table in another oracle server. @Bean(value = "batchSqlSession") @Autowired public ...
Pat's user avatar
  • 649
0 votes
0 answers
70 views

I am trying to insert a record in DB and in one scenario it is throwing java.sql.SQLException(### Error updating database. Cause: java.sql.SQLException: ORA-12899: value too large for column "...
Vishal Gandotra's user avatar
0 votes
1 answer
641 views

I'm trying to run a Java 21 app with Spring boot 2.7.18 and mybatis 3.5.10. The project compiles fine but I get the exception below when i run it. The DEFAULT_DURATION_BETWEEN_EVICTION_RUNS ...
Mr Smith's user avatar
  • 3,538
0 votes
1 answer
672 views

I'm trying to run multiple update statements in my Spring Boot application that is calling MySQL db using MyBatis. XML configured query looks like this: <update id="updateAnglersTrackPositions&...
Nemanja Novakovic's user avatar
0 votes
1 answer
74 views

I'm converting a couple of pieces of code to the newest mybatis dynamic sql, and this line is giving me fits: ** Old Code - won't compile with newest version ** fencingSupportMapper.select { where<...
mikeb's user avatar
  • 11.5k
1 vote
0 answers
479 views

I already induct the dependency of Mybatis, in way of pom. The part of the pom be like: <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId&...
90_nk's user avatar
  • 11
0 votes
0 answers
80 views

As follows, I wrote a query to update multiple rows using the foreach statement. <update id="deleteVhcleInfos" parameterType="java.util.List"> <foreach ...
sinichee's user avatar
-1 votes
1 answer
77 views

Getting SQLSyntaxErrorException while updating List of values in MyBatis. I am using separator=";" in forecach tag, but still I am getting the error. Below is my sql query <update id=&...
NIVESH D's user avatar
1 vote
2 answers
2k views

I am storing playlist information in an SQLite database. This is my entity class; @Data @Builder public class Playlist { private String id; private String playlistName; private ...
mig001's user avatar
  • 388
0 votes
1 answer
193 views

The Task class has an instance of TaskPayload as a member object. @Data @Builder public class Task { private int id; private TaskPayload payload; // skipping other members } @Data @...
mig001's user avatar
  • 388
0 votes
0 answers
82 views

@MockBean is not working for mybatis repositories after upgrading the spring boot version from 2.1 to 2.3. While running the UT, it calls the actual method instead of the mocked method, hence my unit ...
Sandeep Kumar P K's user avatar
0 votes
0 answers
140 views

Recently I noticed that my project takes quite a long time initializing Mybatis-related beans and classes. My database has tens of shards and there is a wrapper that routes queries to the shards. ...
rooot's user avatar
  • 103
0 votes
0 answers
30 views

In a classic spring boot application I've this query in Mapper @Update("UPDATE MY_TABLE SET STATUS_CODE=#{status} WHERE ID_DOC=#{idDoc};") void updateStatus(@Param("status") final ...
ciro's user avatar
  • 801
0 votes
1 answer
462 views

I have a query which returns data from bytea column from postgres. The data type used at java side is byte[] The query in mybatis mapper is like below : <select id="getPhoto" ...
Rajeev's user avatar
  • 486
1 vote
0 answers
71 views

I’m plan to upgrade the spring from 4 to 5 Due to which I need to upgrade mybatis from 2 to 3.5.11 While upgrading mybatis , I’m facing this issue which is something unclear to me. I’m getting below ...
Inked's user avatar
  • 33
2 votes
2 answers
820 views

Built update query in MyBatis xml but no luck to pass BadSqlGrammarException Here's my query <update id="updateRecordingVideoStatus"> UPDATE ...
footlessbird's user avatar
0 votes
1 answer
1k views

My service is as follows, public List<ApplicationConfig> find(@RequestBody String type){ List<WhereClauseParams> conditions = new ArrayList<>(); WhereClauseParams condition = ...
Abhishek Acharya's user avatar
0 votes
0 answers
375 views

i have the following data (which were simplified for the purpose of this question): t1 pk | a | b | c | other1 1 | text1 | 123 | text3 | otherValues1 2 | text2 | 456 | text4 | otherValues2 ...
gabriel119435's user avatar
0 votes
0 answers
635 views

I created a project with eclipse maven. And I use Spring Boot 2.2.2 Release and mybatis-spring-boot-starter 2.1.0, Postgresql 13. It's built as a monolithic application, running over 50 insert queries ...
Hyeonjun Jeong's user avatar
0 votes
0 answers
642 views

It like to be able to set custom properties in MyBatis java config that I can reference later in my XML mappers. I've created a config class that sets two beans: @Bean public DataSource ...
Raff's user avatar
  • 1,058
0 votes
1 answer
222 views

I have an app built on Java, Spring Boot, Apache Camel, MyBatis, Oracle. It used the Java DSL approach to configuration. Many of the routes poll the database for data: @Component public class ...
dcode's user avatar
  • 11
0 votes
1 answer
282 views

so this is pack_name.func_name working at sql developer: using spring and mybatis, i have the issue to deal with oracle's BOOLEAN type with an old jdbc driver that i cannot update. trying this idea, ...
gabriel119435's user avatar
1 vote
0 answers
620 views

I was trying to upgrade my spring version from 4 to 5.3.23 Also updated Jackson databind to 2.13.5 While doing so I needed to upgrade mybatis from 3.0 to 3.5.11 Also mybatis-spring from 1.0 to 2.1.0 ...
Inked's user avatar
  • 33
0 votes
1 answer
3k views

I have the following update query in my mybatis xml: <update id="updateRoleValues" parameterType="map"> UPDATE sandbox.roles SET rolename = #{roleName}, ...
Mark Smith's user avatar
0 votes
2 answers
551 views

I have a rest controller, it will insert 1 record per request,like: @Transactional(rollbackFor = Exception.class) @PostMapping("/create_user") public Response<Empty> createUser(@...
Jayesslee's user avatar
0 votes
0 answers
398 views

How to dynamically pick the schema name based on a request in my batis schema? We would like to do this without changing the arguments or definitions of Mapper files or with parameterType as this ...
Vishnu's user avatar
  • 509
0 votes
1 answer
198 views

The team table and the schdule table are in a 1:n relationship. I made a select query showing the reservation details of team as below. <select id="getTeamSchdules" resultMap="...
koreanDev's user avatar
0 votes
1 answer
94 views

I'm a Spring backend learner, currently want to query some data from mysql. What I want is just a field from table.(I want categoryName in category). First, I was using LambdaQueryWrapper. I wrote ...
siyuan's user avatar
  • 9
1 vote
1 answer
260 views

I am trying to create a Spring bean based on a MyBatis databaseId like so: @Bean fun getSomeBean(@Autowired databaseId: String): SomeBean { if(databaseId.equals("mysql")){ return ...
mikeb's user avatar
  • 11.5k
1 vote
0 answers
1k views

I am trying to write type handler for array of objects but this is giving me errors. I want to store arraylist as JSON in DB(mysql) and retrieve it as arraylist . I got the type handler examples with ...
Priyanka Mane's user avatar
0 votes
1 answer
127 views

previously when I used to used ibatis , it was running fine just by adding java.sql to my logs.properties file in tomcat and that used to output the queries with their params to the log file . now ...
Dany Allaw's user avatar
0 votes
1 answer
569 views

We store one of the UUID values as binary(16) in mysql db. spec MyTable myTable = new MyTable();` //table SqlColumn<Long> id = column("id");` // id column SqlColumn<UUID> ...
aravindaM's user avatar
  • 1,088
0 votes
0 answers
796 views

I'm trying to understand how to do dynamic queries for pagination with myBatis in my java spring-boot application My problem is that the database version of my application is Oracle 11.2 which doesn't ...
user2298581's user avatar
0 votes
0 answers
589 views

I am trying to mock my batis mapper. @SpringBootTest(classes = ApiApplication.class, webEnvironment = WebEnvironment.DEFINED_PORT) @AutoConfigureMockMvc @TestPropertySource("classpath:test-...
Patan's user avatar
  • 18.1k
0 votes
1 answer
1k views

Why mybatis default ExecutorType is Simple not Batch ? Batch is more effective than Simple . Why use Simple as default ExecutorType ?
河馬日報's user avatar
-1 votes
1 answer
30 views

Why is the difference between the time of the database query and the result 13 hours?
YX_Rows's user avatar
0 votes
1 answer
2k views

Im using latest spring boot with spring mybatis which uses mybatis 3.5.9 I have a pojo with a LocalDateTime and the db has a timestamp.. So I would expect mybatis to convert it.. But since, 3.4.1 ...
Daniel Cosio's user avatar
0 votes
1 answer
963 views

I'm trying to insert a UUID value, into a Postgresql table, so I've defined and configured a UUIDTypeHandler to deal with this at mybatis level. Unfortunately, the insert operations are failing with ...
Yonoss's user avatar
  • 1,728
0 votes
1 answer
1k views

I encountered the following error during the posting paging process. I don't even use an array, but I don't know why I get this error. How can I solve this? BoardCriteria is an object that stores the ...
heo's user avatar
  • 11
0 votes
0 answers
3k views

I made a boardContentMap in clubMapper.xml, but I don't know why they can't find it. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined ...
heo's user avatar
  • 11
0 votes
1 answer
213 views

I have a POJO of type: POJO { int id; int name; List<Date> Dates; } Now my POJO is broken into two tables x and y, where y have dates and x have name, which are joined over the id as below: ...
Stotra's user avatar
  • 103
0 votes
1 answer
961 views

Getting this error while iterating over Map in mybatis Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='__frch_key_0', mode=IN, javaType=...
Karan Suthar's user avatar
0 votes
1 answer
391 views

String loadCandies(@Param("id") String id, @Param("varietyList") List varietyList, @Param("errorCode") List errorCodes) How can I achieve this in mybatis xml, as for a ...
Ankur's user avatar
  • 19
1 vote
2 answers
682 views

In my Mapper Class I have a method with the example query: "<script>......" “GROUP BY acct, call, score HAVING sum(case when code in(\n" + "'PTP' \n" + &...
AlexR's user avatar
  • 19

1
2 3 4 5
11