我的要求看起来很简单,但我觉得我在代码中做错了.
我只需要在没有从UI的InputText字段传递任何内容时在Oracle数据库中插入"null".
PaymantSpecFormPage.xhtml
<h:inputText id="startWeek" value="#{flowScope.paymentSpecVO.paymStartWk}" styleClass="inputTypeForm" maxlength="4"/>
Run Code Online (Sandbox Code Playgroud)
PaymentSpecVO.java
public class PaymentSpecVO extends BaseVO<PaymentSpec> {
private Integer paymStartWk;
public Integer getPaymStartWk() {
return paymStartWk;
}
public void setPaymStartWk(Integer paymStartWk) {
this.paymStartWk = paymStartWk;
}
}
Run Code Online (Sandbox Code Playgroud)
在我的数据库表中
COLUMN_NAME DATA_TYPE NULLABLE DEFAULT_VALUE
------------ --------- -------- -------------
PAYM_START_WK NUMBER(4,0) Yes null
Run Code Online (Sandbox Code Playgroud)
当我在inputText中没有输入任何内容时,那么在表格中输入0而不是null,这在我的业务逻辑中有不同的含义,请帮我做必要的代码更改.
我刚为我的windows机器设置了带位桶的git.
Git pull正常工作,git push失败时出现以下错误.
$ git push
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 174.03 KiB | 0 bytes/s, done.
Total 10 (delta 6), reused 0 (delta 0)
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)
任何帮助都很有用.
谢谢