在使用Hibernate实现多对多的测试过程中遇到了这个问题

解决的方法: 将黄色字段的内容添加进去

        <set name="customerSet" table="orders" cascade="all">
<key column="goods_id" ></key>
<many-to-many class="com.bj186.entity.Customer" column="customers_id"></many-to-many>
</set>

问题的原因: 原因是<many-to-many>的配置中, 少了column这个栏的指定

must have same number of columns as the referenced primary key的更多相关文章

  1. Laravel - Union + Paginate at the same time? and another problem----1222 The used SELECT statements have a different number of columns (SQL: (select count(*) as aggregate from

    ### 这是这几天,碰到的一个比较头疼的问题 使用union all联合查询,同时laravel 生成分页,但发生报错? QueryException : SQLSTATE The used from ...

  2. The used SELECT statements have a different number of columns???

    今天我们组就我一个人留守在这里修复bug了,有点小悲伤啊,他们都问我能不能hold得住啊,我当然能hold得住啊: 在看一个入库的存储过程中,在数据库运行的时候是没问题的,项目已启动,进行入库操作就是 ...

  3. 梨子带你刷burp练兵场(burp Academy) - 服务器篇 - Sql注入 - SQL injection UNION attack, determining the number of columns returned by the query

    目录 SQL injection UNION attack, determining the number of columns returned by the query SQL injection ...

  4. 分区实践 A PRIMARY KEY must include all columns in the table's partitioning function

    MySQL :: MySQL 8.0 Reference Manual :: 23 Partitioning https://dev.mysql.com/doc/refman/8.0/en/parti ...

  5. 1503 - A PRIMARY KEY must include all columns in the table's partitioning function

    1503 - A PRIMARY KEY must include all columns in the table's partitioning function 错误的原因:表的主键字段必须包含分 ...

  6. GreenDAO - primary key on multiple columns

    转:http://stackoverflow.com/questions/15250609/greendao-primary-key-on-multiple-columns Does GreenDAO ...

  7. [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'number primary key,

    如题,mysql建表语句报错 分析:就是一个语法错误,具体问题具体分析 本例中,直接赋值过来的 sql建表语句,直接粘贴到mysql数据库运行,报错! 经查询,mysql中 number类型的定义有如 ...

  8. ERROR 1222 (21000): The used SELECT statements have a different number of columns :

    转自:https://blog.csdn.net/linshichen/article/details/52484224

  9. sql语句遇到错误: The used SELECT statements have a different number of columns :

    这是因为使用union的两个SQL语句产生的记录的表结构不一致. 必须是结构完全一致的记录集合才可以使用UNION. 以上就是两个表的字段不一样,导致,所以大家可以检查下.

随机推荐

  1. 配置磁盘映射(在服务器和eclipse 中)

    在eclipse中配置磁盘映射和项目名称访问省略:

  2. cardboard sdk for unity 系统分析 - 对像与类

    一.cardboard通过monobehavior派生的脚本组件与UNITY3D联系起来: 二.相关的类及其关系如下图:

  3. bzoj 1922: [Sdoi2010]大陆争霸【dijskstra】

    d[u]为u被几个节点保护,d1[u]为最早到u的时间,d2[u]为u的最早可进入时间(保护点都被打下来了的时候),然后最终最早进入时间就是max(d1[u],d2[u]),把这个作为权值放进小根堆, ...

  4. codeforces 1006 F(折半搜索)

    F. Xor-Paths time limit per test 3 seconds memory limit per test 256 megabytes input standard input ...

  5. Ubuntu 18 开机后直接进入命令行界面,没法进入桌面

    应该是之前不知道干啥,删了gnome的一个东西,导致没法正常进入 暴力解决,直接重装桌面环境 sudo apt install ubuntu-desktop

  6. Unix\Linux | 总结笔记 | vi编辑器

    0 目录   新建文件夹   常用的命令    三种模式及切换    vi编辑器的启动选项及后续相关操作  其他--替换文本  其他--写入另一个文件     1  新建文件夹  vi [目录名/文件 ...

  7. UVA 11149 Power of Matrix 构造矩阵

    题目大意:意思就是让求A(A是矩阵)+A2+A3+A4+A5+A6+······+AK,其中矩阵范围n<=40,k<=1000000. 解题思路:由于k的取值范围很大,所以很自然地想到了二 ...

  8. 用代码设置 RelativeLayout.LayoutParams

    1.注意 不能在RelativeLayout容器本身和他的子元素之间产生循环依赖,比如说,不能将RelativeLayout的高设置成为WRAP_CONTENT的时候将子元素的高设置成为 ALIGN_ ...

  9. 多功能Markdown编辑器MarkdownPad 2的下载、安装和初步使用步骤(图文详解)(博主推荐)

    不多说,直接上干货!   MarkdownPad 是什么? 一.MarkdownPad 2的下载 http://markdownpad.com/download/markdownpad2-setup. ...

  10. ASP.Net 控件

    简单控件 Label -作用是显示文字,编译后元素是Span 1.文本类 边框: BorderColor 边框颜色 BordersTyle 边框样式 BorderWidth 边框粗细 Literal- ...