From 679567c85a17287e3a04aa2f78f7bec13ce995a8 Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Sun, 26 Mar 2017 14:15:36 +0800 Subject: [PATCH] --- src/org/redkale/source/EntityInfo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/redkale/source/EntityInfo.java b/src/org/redkale/source/EntityInfo.java index b5a013f76..eb47ccd34 100644 --- a/src/org/redkale/source/EntityInfo.java +++ b/src/org/redkale/source/EntityInfo.java @@ -264,6 +264,7 @@ public final class EntityInfo { attributeMap.put(fieldname, attr); } } while ((cltmp = cltmp.getSuperclass()) != Object.class); + if (idAttr0 == null) throw new RuntimeException(type.getName() + " have no primary column by @javax.persistence.Id"); this.primary = idAttr0; this.aliasmap = aliasmap0; this.attributes = attributeMap.values().toArray(new Attribute[attributeMap.size()]);