Ebean update set column在PlayFramework2.1中

时间:2014-02-14 03:33:53

标签: java playframework-2.0 ebean

一些代码:

`public class Test extends Model {
  @Id
  public Integer id;
  public String name;
  public Double roomFee;
}`

inDataBase:name 'candy' ; id 1; roomFee 200.5;

然后我想更新roomFee = Null,所以来自web front params test.name ='changeName',test.id = 1

当我得到modle(test:test.name ='changeName',test.id = 1; test.roomFee = null)时,

执行test.update()

inDataBase:的 name 'changeName' ; id 1; roomFee 200.5;

列roomFee(为空)不更新为null

为什么Ebean不更新列(为空)?如何更新column = null

0 个答案:

没有答案