错误如图:
其中的 resourcese0_为一个实体对象,但是由于在做关联查询时没有在映射文件中配置column属性导致以上错误,究其原因为在做通过中间表进行关联查询时如果不在many-to-many中配置column属性,hibernate在查询时会自动为resourcese0_添加一个elt属性,但是这个实体类,映射文件,数据库中都不含有elt属性,所以数据库会报错。
映射文件如下:
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated 2013-7-17 17:05:27 by Hibernate Tools 3.6.0 --> <hibernate-mapping> <class name="com.tarena.bookshop.security.model.DAuthorities" table="d_authorities" catalog="dangdang"> <id name="authorityId" type="java.lang.Integer"> <column name="authority_id" /> <generator class="identity" /> </id> <property name="authorityName" type="string"> <column name="authority_name" length="40" not-null="true" /> </property> <property name="authorityDesc" type="string"> <column name="authority_desc" length="100" /> </property> <property name="enabled" type="int"> <column name="enabled" not-null="true" /> </property> <property name="issys" type="int"> <column name="issys" not-null="true" /> </property> <set name="resourceses" table="d_authorities_resources" inverse="true" lazy="true" fetch="select"> <key> <column name="authority_id" not-null="true" /> </key> <!-- 此处之前没有写column="resource_id" 导致 hibernate自动为DResources添加了一个elt属性导致数据库报错 --> <many-to-many column="resource_id" class="com.tarena.bookshop.security.model.DResources" /> </set> </class> </hibernate-mapping>
相关推荐
HDDF2-001-15.elt
ELT和表单控件
ELT0 ELT0是一种通用类型的汇编语言。 资源 (已过时) 安装 $ stack install 特征 控制流安全 堆叠安全 类型安全 (谓词)堆栈多态性 代码示例 将以下程序写入文件,例如prod.elt0 。 main Code: mov R1 21 mov ...
financial_statements_elt
BI ETL ELT Kettle 基础知识中文文档汇总 BI项目中ETL设计与思考.pdf CTL工具.pdf ETL-开发规范.pdf ETL_--_事实表.pdf ETL_文档.pdf ETL_架构.pdf ETL_调度系统技术方案说明书_V1.0.pdf ETL中的数据清洗...
ELT26112558_HOMEWORK ELT2611作业,第1学期,2015学年
RWC23_elt2_regulated_genes 该分析的目的是更好地了解秀丽隐杆线虫肠主调节剂ELT-2的发育ChIP-seq数据。 此分析分为三个部分 将ELT-2 ChIP-seq与ELT-2 / EL-7差异表达整合 收集公开可用的秀丽隐杆线虫肠道数据集 ...
黑莓8820 net_rim_bb_elt_resource_zh_CN.cod
ELT Methodology 12pp.ppt
构建dubbo项目的时候会遇到: Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. ...
TutorialsPoint ELT 测试教程.epub
主要给大家介绍了关于spring配置文件解析失败报”cvc-elt.1: 找不到元素 'beans' 的声明”异常的解决方法,需要的朋友可以参考下
SpecCADO是SimCADO中光谱模式的原型,SimCADO是MICADO @ ELT的仪器数据模拟器。 通过执行安装软件包 pip install . 或者 pip install --user . 在解压后的speccado目录中。 如果pip和python指向python-2.7安装...
三洋32CE561LED主板TP.VST59S.P79屏ELT315A0724KEA11GJ02562存储器GD25Q32.zip三洋32CE561LED主板TP.VST59S.P79屏ELT315A0724KEA11GJ02562存储器GD25Q32.zip三洋32CE561LED主板TP.VST59S.P79屏ELT315A0724KEA11GJ...
MTK平台日志分析工具 gat-win32-x86_64-3.1809.4.c ,希望能够帮忙到大家
在马来西亚的背景下,教育部意识到英语教师的英语水平急剧下降,因此教育部通过实施在职培训计划或称为Pro-ELT(英语专业技能提升)来招募以英语为母语的培训师语言老师)。 但是,关于Pro-ELT计划的结果总是有好有...
elasticity code with adaptative mesh
elt学习资料,初学者看,可以进行了解和学习
最近在做一个文件下载的功能,这里把做的过程中用... elt.setAttribute('href', url); elt.setAttribute('download', 'file.png'); elt.style.display = 'none'; document.body.appendChild(elt); elt.click(); d