Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
88 views

MyBatis Mapping Xml Issue

I was writing this project and I have this problem about the mapping. I am doing something wrong but I cannot find it. I've also checked the document of MyBatis but I couldn't find any update info. I'...
Atılgan Şahin Ulaşan's user avatar
1 vote
0 answers
564 views

Mybatis upgrade issues related to parameters

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
0 answers
542 views

error while inserting java map into database using mybatis

I am trying to insert a HashMap into database columns using mybatis. My code is as shown below @Insert({ "<script>", "INSERT INTO msg_monitored_grp(", ...
Akash Sharma's user avatar
1 vote
1 answer
726 views

mybatis avoid generating model class *WithBLOBs

I have to change a column from varchar2 to clob. After generation mybatis creates a *WithBlobs class with fields that extends the original class. To avoid several impacts it would be possible to avoid ...
Plijen's user avatar
  • 69
0 votes
1 answer
971 views

Retrieving a list of values across databases with mybatis

I have 2 Java POJO files class Filter Variables { private String id; private String name; private List<ValueVariables> variableValues; getters() setters() } class ValueVariables { private ...
Abhiram Natarajan's user avatar
2 votes
1 answer
703 views

Mybatis Insert PK manually

I am trying to single insert data into table with assigned PK. Manually assiging PK. XML file <insert id = "insertStd" parameterType = "com.org.springboot.dao.StudentEntity" ...
Surya Chandra's user avatar
0 votes
1 answer
1k views

AbstractMethodError and null maper when calling the DAO in a service

I'm building a standalone app with Spring boot, Mybatis (spring and generator), I think I configured everything alright but the autowired mapper is null, and I get an AbstractMethodError when calling ...
Niedon's user avatar
  • 15
0 votes
1 answer
3k views

MyBatis Generator cannot instantiate the custom plugin class

I'm using MyBatis Generator in Spring Boot 2.1.9 + Gradle project to generate Entity classes and mapper classes from PostgreSQL DB. I have added some plugin to generate annotation and optimistic lock. ...
fanfanta's user avatar
  • 181
0 votes
1 answer
979 views

how to create a query in mybatis_dynamic_sql for TO_CHAR(USE_BY_DATE - ?,'YYYYMMDD') >=TRUNC(SYSDATE)

I want to achieve the below sql query in mybatis_dynamic_sql. select * from xyz where TO_CHAR(some_date_col - ?,'YYYYMMDD') >=TRUNC(SYSDATE)
deepak PATRA's user avatar
1 vote
2 answers
2k views

how to set null with updateByPrimaryKeySelective by config in mybatis generator

this is my batis generator file: <table tableName="jxc_stock_journal" enableCountByExample="true" enableSelectByPrimaryKey="true" enableSelectByExample=&...
chanjianyi's user avatar
0 votes
2 answers
2k views

Mybatis annotation how to return hashmap key item if value is null

springboot mybatis example: @Select({"select id,xx from table where id=#{id}"}) Map<String,Object> queryById(@Param("id") Long id); if table xx is null, the returned map does not contains xx ...
Jim Green's user avatar
  • 1,118
1 vote
0 answers
346 views

Mybatis keygenerator field how to fill with id value(which is null before)?

Mysql database has a table(id bigint auto_increment primary key, xx), and springboot code follows: @Insert({"insert into table(xx) " + "values (#{xx}"}) @Options(useGeneratedKeys=true, ...
Jim Green's user avatar
  • 1,118
0 votes
1 answer
1k views

Mybatis generator configuration set tableName case sensitive

This is my xml configuration: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "mybatis-generator-...
michele's user avatar
  • 26.6k
2 votes
1 answer
3k views

Mybatis generator xml configuration. Set join between tables

I have three tables: table ONE pk:ONE.ID table TWO fk:TWO.ID with ONE.ID pk:TWO.ID TWO.FIELD table THREE fk:TWO.ID with THREE.ID and TWO.FIELD=THREE.FIELD Is it possible to set the join in the xml ...
michele's user avatar
  • 26.6k
3 votes
2 answers
20k views

mapping input and output parameters with MyBatis

I am learning how to use MyBatis. Honestly I like this framework very well. It is easy to use and I am happy with it because I can use my sql commands with it :) I use MyBatis 3.4.2 and PostgreSQL ...
zappee's user avatar
  • 22.5k
1 vote
0 answers
2k views

MyBatis SelectProvide pass object as parameter

I am using SelectProvider to execute a stored procedure on run-time. @SelectProvider(type = SqlGenerator.class, method = "getProcedure") @Options(statementType = StatementType.CALLABLE) public void ...
rohit's user avatar
  • 1,003
0 votes
0 answers
192 views

SpringMVC and Mybatis can't run 'insert'

When I click submit in localhost:8080/myregister.jsp(controller: localhost:8080/user/register),it gets: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: ...
Bonsen's user avatar
  • 1
1 vote
0 answers
644 views

Mybatis generator generates POJO class with Long instead of Custom Object

In mybatis generator plugin if we generate POJO classes and XML mappers file, the POJO class looks like this, public class User { Long id; String name; Long team; //<---...
Lucky's user avatar
  • 17.3k
0 votes
1 answer
786 views

myBatis 3 query from tables without relationship

I got 2 tables: Table StatementDetails with columns: private String detailId; private BigDecimal tranxlogid; private String statementId; Table transLog with columns: private ...
Tran Tam's user avatar
  • 699