实体元数据建模时候关于id问题can't find column in table
二开在新建实体元数据时候,实体元数据会自动带出一个id,如果这个实体不继承至CoreBase基类的实体,那么这个id属性就是主键,无需删除;如果继承至CoreBase基类的实体,那么新带的id属性需要手工删除,不然在程序运行时候就会报错;同时逻辑建需要设置为CoreBase的id属性
如:
Caused by: java.lang.reflect.UndeclaredThrowableException: TxEJB wrap a Not_BaseException while Reflect Invoke ControllerBean. at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.invoke(TxInvokerBean.java:161) ~[sp-bosframework.jar:] at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.INVOKE_REQUIRED(TxInvokerBean.java:60) ~[sp-bosframework.jar:] ... 199 more Caused by: java.lang.IllegalStateException: can't find column in table. bo:com.kingdee.eas.hr.custom.performance.configuration.app.AppraisalIdentityRelationHR, prop:id at com.kingdee.bos.metadata.entity.EntityObjectInfo.innerGetMappingFieldOfProperty(EntityObjectInfo.java:1646) ~[sp-metadata.jar:] at com.kingdee.bos.metadata.entity.EntityObjectInfo.getMappingFieldOfProperty(EntityObjectInfo.java:1602) ~[sp-metadata.jar:] at com.kingdee.bos.dao.ormapping.impl.SQLGeneratorImpl.innerGetSQL(SQLGeneratorImpl.java:270) ~[sp-bosframework.jar:] at com.kingdee.bos.dao.ormapping.impl.SQLGeneratorImpl.innerSelectSQL(SQLGeneratorImpl.java:181) ~[sp-bosframework.jar:] at com.kingdee.bos.dao.ormapping.impl.SQLGeneratorImpl.selectSQL(SQLGeneratorImpl.java:107) ~[sp-bosframework.jar:] at com.kingdee.bos.dao.ormapping.impl.SQLGeneratorCache.selectSQL(SQLGeneratorCache.java:111) ~[sp-bosframework.jar:] at com.kingdee.bos.dao.ormapping.impl.SQLGeneratorCache.selectSQL(SQLGeneratorCache.java:89) ~[sp-bosframework.jar:] at com.kingdee.bos.dao.ormapping.impl.SQLGeneratorCache.selectSQL(SQLGeneratorCache.java:80) ~[sp-bosframework.jar:] at com.kingdee.bos.dao.ormapping.impl.EntityAccess.exists(EntityAccess.java:489) ~[sp-bosframework.jar:] at com.kingdee.bos.dao.ormapping.impl.ObjectReader.exist(ObjectReader.java:281) ~[sp-bosframework.jar:] at com.kingdee.bos.dao.ormapping.ORMappingDAO.exists(ORMappingDAO.java:1396) ~[sp-bosframework.jar:] at com.kingdee.bos.framework.ejb.AbstractEntityControllerBean.innerExists(AbstractEntityControllerBean.java:116) ~[sp-bosframework.jar:] at com.kingdee.eas.framework.app.AbstractCoreBaseControllerBean._exists(AbstractCoreBaseControllerBean.java:606) ~[eas_framework-server.jar:] at com.kingdee.eas.hr.custom.performance.configuration.app.AbstractAppraisalIdentityRelationHRControllerBean._exists(AbstractAppraisalIdentityRelationHRControllerBean 2023-11-10 13:59:20 信息 [con.out-Thread 309] .java:98) ~[performance.jar:?] at com.kingdee.eas.hr.custom.performance.configuration.app.AbstractAppraisalIdentityRelationHRControllerBean.exists(AbstractAppraisalIdentityRelationHRControllerBean.java:82) ~[performance.jar:?] at com.kingdee.shr.base.syssetting.app.BaseItemRelationHRControllerBean.doStateByTwoId(BaseItemRelationHRControllerBean.java:258) ~[sp-shr_syssetting-server.jar:] at com.kingdee.shr.base.syssetting.app.BaseItemRelationHRControllerBean._enable(BaseItemRelationHRControllerBean.java:131) ~[sp-shr_syssetting-server.jar:] at com.kingdee.shr.base.syssetting.app.AbstractBaseItemRelationHRControllerBean.enable(AbstractBaseItemRelationHRControllerBean.java:242) ~[sp-shr_syssetting-server.jar:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_345] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_345] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_345] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_345] at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.invoke(TxInvokerBean.java:125) ~[sp-bosframework.jar:] at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.INVOKE_REQUIRED(TxInvokerBean.java:60) ~[sp-bosframework.jar:] ... 199 more
检查实体元数据,发现该实体继成至CoreBase,但是id属性未删除
标准产品正确做法如图:
实体元数据建模时候关于id问题can't find column in table
二开在新建实体元数据时候,实体元数据会自动带出一个id,如果这个实体不继承至CoreBase基类的实体,那么这个id属性就是主键,无需删除;如...
点击下载文档
本文2024-09-16 23:44:17发表“s-hr cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-shr-56479.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章