有时候实体里的一些属性并不想映射到数据库(比方说子级菜单List),

如果不做处理的话会报字段映射错误找不到这列Column Not Found

例如:org.hibernate.MappingException: Could not determine type for: java.util.List, at table: xxxx, for columns: [org.hibernate.mapping.Column(xxx)]

Hibernate实体类注解可以让某些属性不映射到数据库

使用hibernate注解@Transien放在属性上即可解决此问题。

import javax.persistence.Transient;

没有get方法的属性可以直接写在属性上面,有get方法的要在get方法上也写上

hibernate报错:MappingException: Could not determine type for...解决办法的更多相关文章

  1. jenkins编辑报错Exception when publishing, exception message的解决办法

    jenkins编辑报错Exception when publishing, exception message的解决办法 查看目标主机的磁盘空间是否占满,清理磁盘空间即可

  2. 第一次打开pycharm运行python文件报错”No Python interpreter selected“问题的解决办法

    前面没有细讲,这里细述一下安装pycharm后,第一次打开pycharm运行python文件报错"No Python interpreter selected"问题的解决办法. 出 ...

  3. 项目报错:/uploads: Read-only file system(解决办法)

    项目报错:/uploads: Read-only file system(解决办法) 本来以为是service层没加注解,翻到最后才发现问题 原因是项目根目录没有对应的文件夹,在项目根目录创建uplo ...

  4. Dubbo广播模式下报错:Can't assign requested address解决办法

    原因: 尝试使用Dubbo的multicast模式,发现一运行就报Can't assign requested address的错误,造成这种原因的主要是系统中开启了IPV6协议(比如window7) ...

  5. HTTP报错401和403详解及解决办法

    一.401: 1. HTTP 401 错误 - 未授权: (Unauthorized) 您的Web服务器认为,客户端发送的 HTTP 数据流是正确的,但进入网址 (URL) 资源 , 需要用户身份验证 ...

  6. 关于javaweb项目红叉报错可但项目可以正常运行的解决办法

           有时候导入的项目工程,文件夹左下角永远有一个红叉,但是由于不影响程序运行,所以之前一直忽略了,但是强迫症患者表示不解决巨蓝瘦,网上有些方法没有讲清楚,所以今天做了个总结来教大家如何详细解 ...

  7. 推送GitHub报错 fatal: Out of memory, malloc failed 解决办法

    现象: 推送GitHub时,出现如下报错 fatal: Out of memory, malloc failed (tried to allocate XXXXXX bytes)error: fail ...

  8. 命令行运行python项目文件,报错:ModuleNotFoundError: No module named 'xxxx' 解决办法

    在pycharm中写好了自动化测试脚本,并能在pycharm中正常运行,由于要考虑到无人值守时能自动执行,执行时就需要脱离pycharm,直接能用命令执行.但是直接用命令执行用例文件:python3 ...

  9. linux安装oracle 报错[INS-20802] Oracle Net Configuration Assistant failed 解决办法

    [INS-20802] Oracle Net Configuration Assistant failed 首先从LinuxIDC.com下载这个补丁包,然后用 unzip p8670579_1120 ...

随机推荐

  1. what is muxing and demuxing

    They're short for multiplexing and demultiplexing. Multiplexing means combining different types of d ...

  2. Vmware初次安装虚拟机需要做的一些网络配置——nat模式与桥接模式

    一.本机设置: 1.首先点击图中红线区域: 2.点击网络适配器  3.会出现如下区域: 4.网卡开启后设置ip地址,此处设置的ip和本机的ip没有关系,设置成你虚拟机里面运行的计算机需要的ip地址网段 ...

  3. WeChall_Prime Factory (Training, Math)Training: WWW-Robots (HTTP, Training)

    In this little training challenge, you are going to learn about the Robots_exclusion_standard.The ro ...

  4. WeChall_Training: Get Sourced (Training)

    The solution is hidden in this page Use View Sourcecode to get it 解题: 网页源码,最后一行 <!-- You are look ...

  5. 新的起航从这里开始 Encantado!

    大家好,我是一名DBA之前也在其它地方写过blog,但是可惜目前在greatwall之内都不能访问了. 如果有小伙伴可以在墙外访问的话 可以尝试着看看这个地址 https://liuleiit.wix ...

  6. 【CMake】CMake ERROR:could not find git for clone of

    在使用 CMake 构建VS2015项目时遇到一个错误提示:could not find git for clone of. 因为项目需要从GitHub导入运行库,但构建项目时提示未能找到这个库,而g ...

  7. Thread Based Parallelism - Thread Synchronization With Lock

    Thread Based Parallelism - Thread Synchronization With Lock import threading shared_resource_with_lo ...

  8. MongoDB入门(介绍、安装)

    一.什么是MongoDB? MongoDB is a document database with the scalability and flexibility that you want with ...

  9. cdh集群hive升级,数据不丢失

    1.下载hive-1.2.1安装包 http://archive.apache.org/dist/hive/hive-1.2.1/apache-hive-1.2.1-bin.tar.gz 2.将安装包 ...

  10. IIS停止服务 报错Connections_Refused

    IIS版本6.0  无故停止工作.         重启IIS 没有效果,必须重启web服务器.出现客户端无法访问Web服务器上的站点,错误信息提示为"页面无法显示"的情况.登录服 ...