如何获取hibernate中实体主键的名称 - ITeye问答
2010年7月23日 - 如题 我有一个实体类 class table{ private String id; private String name; ... } 其中id是主键(在映射文件里配置了) 我使用了spring + hibernate的...
如何获取hibernate 实体类 中的主键_百度知道
最佳答案: /** * 获取主键名称 * @return */ public String getPkname() { Field[] fields = this.entityClass.getDeclaredField(); for (Field field : ...