`

Null value was assigned to a property of primitive type setter

阅读更多
private int a ;

当数据库设为允许为空, 查询都会报错,

原因:数据库字段值为NULL,int 类型不能赋值为NULL,只能为0,但有些实际应用中,如学生分数,0表示0分,NULL,则表示暂无分数所以,要不设数据字段不为NULL,要不就是用Integer.

解决办法:
javabean:
     private int a ; 改为  private Integer a ;
分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

    tfs2010 assigned To改变邮件自动转发

    功能是工作项的Assigned To字段变化,自动给指派人发送邮件,此结构是host宿主程序,可以将Assigned To更改为其他字段

    Visual Studio打开Qt项目时“there's no Qt version assigned to this proj

    Visual Studio打开Qt项目时“there's no Qt version assigned to this project for platform win32”问题的解决方法1

    S7A驱动720版本

    - When the signal conditioning function "S&M" was used for a byte value, the driver wrote wrong values to the PLC. Build 223 : New Functions: - The number of supported NetLinks has been ...

    EHLib 6.3.171〖D7~XE5〗

    This property can be assigned by a maximum time, which will be used to calculate the widths of the columns when the user double click on the line that separates columns. If the time of calculation ...

    Kubernetes+in+Action-Manning(2018)

    After working at Red Hat for a few years, in late 2014 I was assigned to a newly- established team called Cloud Enablement. Our task was to bring the company’s range of middleware products to the ...

    Poul Skott Stay Alive

    After his service with NASA, Lockhart was assigned to and graduated in 2004 from the Royal College of Defence Studies in London, United Kingdom. His last military assignment was with the headquarters ...

    haproxy-1.5.14.tar

    I want to address sincere congratulations to Charlie Smurthwaite of aTech Media for the really detailed traces he provided which made it possible to find the cause of this bug. Every user of 1.5-dev,...

    数位板压力测试

    This specification was developed in response to a perceived need for a standardized programming inter-face to digitizing tablets, three dimensional position sensors, and other pointing devices by a ...

    IRIG STANDARD 200-04 - IRIG SERIAL TIME CODE FORMATS

    IRIG Standard 200-98 was last updated in May 1998 and defined the characteristics of the serial time codes A, B, D, E, G, and H This 2004 edition of the Standard incorporates year information for ...

    2009 达内Unix学习笔记

    [] 匹配中括号里的内容[a-z][A-Z][0-9]。 ! 事件。 $ 取环境变量的值。 | 管道。把前一命令的输出作为后一命令的输入,把几个命令连接起来。 |经常跟tee连用,tee 把内容保存到文档并显示出来。 三、通用后...

    servlet2.4doc

    Creates a cookie, a small amount of information sent by a servlet to a Web browser, saved by the browser, and later sent back to the server. Cookie(String, String) - Constructor for class javax....

    Kubernetes in Action-Manning Publications (2018)

    After working at Red Hat for a few years, in late 2014 I was assigned to a newlyestablished team called Cloud Enablement. Our task was to bring the company’s range of middleware products to the ...

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

    Used to lock ranges between records in a table to prevent phantom insertions or deletions into a set of records. Ensures serializable transactions. RID A Row Identifier. Used to individually lock a ...

    Delphi7.1 Update

    * Editing the value of an InternalCalc field on a nested TClientDataset causes the ChangeCount property of the parent dataset to increase (Quality Central 2027). * A TLargeIntField cannot be used as ...

    DELPHI7托盘图标控件,230(好用).zip

    when no popup menu was assigned to the icon. - ver. 1.0.2: Added a Handle property, and enabled handling of default menu items. (Partially) fixed a bug so the icon will update itself when a new ...

    TscExcelExport 3.6 full source

    - Text property of field in stead of Value property is exported so OnGetText events can be used Version 2.91 - Improvements SetFormat (before exporting data) - Added support for fieldtype ...

    A Non-Replication Multicasting Scheme in Delay

    Delay tolerant networks (DTNs) are a special type of wireless mobile networks which may lack continuous network connectivity. Multicast is an important routing function that supports the distribution ...

    Graphical Modeling Framework Architecture Overview

    The Graphical Modeling Framework (GMF) project was recently assigned to EMP as a tool for the creation of Graphical Editors for userdefined meta-models. At the same time, GMF itself uses several MDE ...

    Semi-Automatic 2D-to-3D Conversion Using disparity propagation

    Then, the initial disparity map is assigned to each key frame with the aid of various preset disparity models for each object. After the disparity assignment step, disparity maps for other frames of ...

    Big.Data.and.IT.Professionals.1514870622

    Big Data and IT Professionals: A Study of the Perceptions Held by IT Professionals in Relation to the Maturity, Value, and Practical Deployment of Big Data Solutions This work documents a research ...

Global site tag (gtag.js) - Google Analytics