`

Error setting null parameter. Most JDBC drivers require that the JdbcType must b

阅读更多

异常类型:Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for all nullable parameters

.<insert id="insertTransactionLog" parameterType="transactionLog">
insert into "transactionLog"
values
(transactionLog_Sequence.nextval,
#{user.id,jdbcType=NUMERIC},
#{staff.id,jdbcType=NUMERIC},
#{inputCard},
#{outputCard},
#{date},
#{money},
#{type.id,jdbcType=NUMERIC},
#{profit},
#{status},
#{remark})
</insert>
异常类型:Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for all nullable parameters
原因:MyBatis 插入空值时,需要指定jdbcType 。在pl/sql不会提示错误,主要原因是mybatis无法进行转换

 

2.分页查询
select
a."id",
a."user" as "user.id",
a."staff" as "staff.id",
a."inputCard",
a."outputCard",
a."date",
a."money",
a."type" as "type.id",
a."profit",
a."status",
a."remark"
from "transactionLog" a where a."staff"=#{staffId} and a."id" not in(select "id" from "transactionLog" where ROWNUM &lt;= (${logs.page}-1)*${logs.evcnt} and "staff"=#{staffId} ) and ROWNUM &lt;=${logs.evcnt}
注意:在子查询中同样要将主查询条件写入其中:a."staff"=#{staffId},这个问题很容易忽略,切记切记啊!

分享到:
评论

相关推荐

    require.js最新版2.3.5

    require.config({ paths: { 'handlebars': 'path/to/handlebars' }, shim: { 'handlebars': { exports: 'Handlebars' } } }); ``` 然后,我们可以定义并使用模板: ```javascript require(['handlebars', ...

    requireDir, node.js helper 到 require() 目录.zip

    requireDir, node.js helper 到 require() 目录 requireDir ( )node helper 到 require() 目录。 检查目录文件,并且可以为 require()的每个文件都具有 require(),并作为散列的一部分返回到它的导出的内容。示例...

    数位板压力测试

    The availability of drivers that support the features of the specification will simplify the process of developing Windows appli¬cation programs that in-corporate absolute coordinate input, and ...

    require.js插件-text.js使用

    首先,安装text.js非常简单,只需要将它添加到你的项目中,通常与require.js放在同一目录下。如果你使用的是npm,可以通过以下命令进行安装: ```bash npm install requirejs-text --save ``` 然后,在你的配置...

    Node.js-基于require.js的Node打包方案

    在Node.js环境中,`require.js`通常用于浏览器端的模块加载和管理,它遵循AMD(Asynchronous Module Definition)规范,而Node.js自身则使用CommonJS规范处理模块导入。不过,有时候开发者可能希望将使用了require....

    require.Sandbox:require.js 的沙箱模块

    require.Sandbox require.js 的沙箱模块 require.Sandbox 是一个沙盒模块,集成到,可用于安全加载模块。 这个想法是将它们包装到一个沙箱中,以确保错误不会使整个应用程序崩溃,但可以以编程方式处理。 沙盒错误 ...

    蓝屏查看,主要用于查找蓝屏错误

    1. All Drivers: Displays all the drivers that were loaded during the crash that you selected in the upper pane. The drivers/module that their memory addresses found in the stack, are marked in pink ...

    Android代码-FastAdapter

    Most use cases require the same base logic, but require you to write everything again and again. The FastAdapter is here to simplify this process. You don't have to worry about the adapter anymore. ...

    weifenluo.winformsui.docking 2.9(最新源码&例子)

    2. Opt-in ShowAutoHideContentOnHover feature to require a tab to be clicked on to show autohide content vice the current behavior of showing on hover. 3. Fixed issues with the sample application: ...

    require.js学习指南

    require.jsrequire.jsrequire.jsrequire.jsrequire.jsrequire.js

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    In earlier revisions, the error status light was cleared after a VsSetWavelength() call failed, so the user did not see the light turn red to alert that an error had occurred. This has been fixed in ...

    BURNINTEST--硬件检测工具

    - Correction to setting the CD burn test drive in preferences. - Changed the mechanism to check for the required DirectX Direct3D as the previous method did not work on some system (some W2003 ...

    Java邮件开发Fundamentals of the JavaMail API

    POP is the mechanism most people on the Internet use to get their mail. It defines support for a single mailbox for each user. That is all it does, and that is also the source of a lot of confusion...

    acpi控制笔记本风扇转速

    produced when this parameter was a null string (""). Now, the original input filename is used as the AML output filename, with an ".aml" extension. Implemented a generic batch command mode for the ...

    计算机网络第六版答案

    Hence, it becomes possible for the attacker to issue a command to all the nodes, that target a single node (for example, all nodes in the botnet might be commanded by the attacker to send a TCP SYN ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    For example, if your header file uses the File class in ways that do not require access to the declaration of the File class, your header file can just forward declare class File; instead of having ...

    微软内部资料-SQL性能优化5

    Keeping your clustered key value small increases the number of index rows that can be placed on an index page and decreases the number of levels that must be traversed. This minimizes I/O. As we’ll ...

    微软内部资料-SQL性能优化3

    Setting an intent lock at the table level prevents another transaction from subsequently acquiring an exclusive (X) lock on the table containing that page. Intent locks improve performance because ...

    windows update logic

    For instance, printer drivers often require specific functionalities that might not be applicable to other types of devices. As a result, the logic used to offer printer drivers can differ from that ...

Global site tag (gtag.js) - Google Analytics