MyBatis by containing the Jdbctype type bit FLOAT CHAR TIMESTAMP other undefinedtinyint REAL V Archar BINARY BLOB nvarcharsmallint DOUBLE longvarchar VARBINARY CLOB Nchari Nteger NUMERIC DATE longvarbinary BOOLEAN nclobbigint DECIMAL time NULL CURSOR mybatis Javatype and jdbctype corresponding and crud example XML code copy Code collection code 1.<resultmap type= "Java.util.Map" id= "RESULTJCM" > 2. <result property= "Fld_number" column= "Fld_number" javatype= "Double" jdbctype= "NUMERIC"/> 3. <result property= "Fld_varchar" column= "Fld_varchar" javatype= "string" jdbctype= "VARCHAR"/> 4. <result property= "Fld_date" column= "Fld_date" javatype= "Java.sql.Date" jdbctype= "DATE"/> 5. <result property= "Fld_integer" column= "Fld_integer" javatype= "int" jdbctype= "INTEGER"/> 6. <result property= "fld_double" column= "fld_double" javatype= "Double" jdbctype= "Double"/> 7. <result PRoperty= "Fld_long" column= "Fld_long" javatype= "LONG" jdbctype= "INTEGER"/> 8. <result property= "Fld_char" column= "Fld_char" javatype= "string" jdbctype= "CHAR"/> 9. <result property= "Fld_blob" column= "Fld_blob" javatype= "[B" jdbctype= "BLOB"/> 10. <result property= "Fld_clob" column= "Fld_clob" javatype= "string" jdbctype= "CLOB"/> 11. <result property= "Fld_float" column= "fld_float" javatype= "float" jdbctype= "float"/> 12. <result property= "Fld_timestamp" column= "Fld_timestamp" javatype= "Java.sql.Timestamp" jdbctype= "TIMESTAMP"/> </resultMap> MyBatis Javatype and Jdbctype correspondence Notepad code copy code collection code 1. JDBC type Java type 2.CHAR string 3.VARCHAR string 4.LONGVARCHAR string 5 . NUMERIC java.math.BigDecimal 6.DECIMAL java.math.BigDecimal 7.BIT boolean 8.BOOLEAN Boolean 9.TINYINT byte 10.SMALLINT short 11.INTEGER int 12.BIGINT long 13.REAL float 14.FLOAT double 15.DOUBLE d Ouble 16.BINARY byte[] 17.VARBINARY byte[] 18.LONGVARBINARY byte[] 19.DATE Java.sql.Date 20.TIME java.sql.Time 21.TIMESTAMP java.sql.Timestamp 22.CLOB Clob 23.BLOB BLOB 24.ARRAY ARRAY 25.DISTINCT mapping of underlying type 26.STRUCT STRUCT 27.REF REF 28.DATALINK Java.net.url[color=red][/color]
Jdbctype and Javatype