From 89424f928327fec6b4a17989f723153ed693d23c Mon Sep 17 00:00:00 2001 From: wendal Date: Mon, 14 Oct 2013 22:55:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#530=20:=20=E5=BD=93=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=98=AF=E4=B8=80=E4=B8=AA=E9=9B=86=E5=90=88?= =?UTF-8?q?=E4=B8=94=E5=8C=85=E5=90=ABnull=E7=9A=84=E8=AF=9D,=20=E4=B8=AD?= =?UTF-8?q?=E9=80=94=E4=BC=9A=E6=8A=A5=E9=94=99=20-->=20=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=8F=90=E5=89=8D=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/org/nutz/dao/impl/link/DoInsertLinkVisitor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/nutz/dao/impl/link/DoInsertLinkVisitor.java b/src/org/nutz/dao/impl/link/DoInsertLinkVisitor.java index 59a374ce5..1d2a5abcb 100644 --- a/src/org/nutz/dao/impl/link/DoInsertLinkVisitor.java +++ b/src/org/nutz/dao/impl/link/DoInsertLinkVisitor.java @@ -34,6 +34,8 @@ public Object invoke(Connection conn, ResultSet rs, Pojo pojo) throws SQLExcepti final Entity en = lnk.getLinkedEntity(); Lang.each(value, new Each() { public void invoke(int i, Object ele, int length) throws ExitLoop, LoopException { + if (ele == null) + throw new NullPointerException("null ele in linked field!!"); // 执行插入 opt.addInsert(en, ele); // 更新字段