nutzam / nutz

Nutz -- Web Framework(Mvc/Ioc/Aop/Dao/Json) for ALL Java developer
https://nutzam.com
Apache License 2.0
2.53k stars 942 forks source link

Daos.exts 方法批量更新错误 #805

Closed Rekoe closed 9 years ago

Rekoe commented 9 years ago
Table("A_${tim}")
public class A extends B{

@Id
private int id;
private long uid;
private String name;
public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name= name;
    }
public long getUid() {
        return this.uid;
    }
    public void setUid(long uid) {
        this.uid = uid;
    }
}
public abstract class B{
    public abstract long getUid();
}

当调用方法

Daos.ext(dao,  FieldFilter.create(A.class, null, "^(name)$", true),1).upate(list);

会报 这个错误 http://nutz.cn/JP

wendal commented 9 years ago
// 修正方法
// org.nutz.dao.util.Pojos.getFieldsForUpdate(Entity<?> en, FieldMatcher fm, Object refer)

// mf.getValue(Lang.first(refer))

修改后testall能pass, 但还不确定改不改

wendal commented 9 years ago

@zozoh @pangwu86 @ywjno 看看

zozoh commented 9 years ago

嗯,看看这么改应该没啥副作用