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()]);