The given object has a null identifier解决之法
<input
type="hidden"
name="memberPermission.id"
value="${memberpermission.id}">
<input
type="hidden"
name="memberPermission.mtid"
value="${memberpermission.mtid}">
出现这个异常,一般来说主要修改时候主键没有传递或者name属性指定错误。
解决方案:你要把你的更新的实例的主键传过去,可以以hidden的方式传。
参考:http://blog.csdn.net/chenssy/article/details/8362871
The given object has a null identifier解决之法的更多相关文章
- org.hibernate.TransientObjectException:The given object has a null identifier
1.错误描述 org.hibernate.TransientObjectException:The given object has a null identifier:com.you.model.U ...
- 报错HTTP Status 500 - The given object has a null identifier: cn.itcast.entity.Customer; nested exception is org.hibernate.TransientObjectException: The given object has a null identifier:
在使用模型驱动封装的时候,要保证表单中name属性名和类中属性名一致,否则将会报错如下: HTTP Status 500 - The given object has a null identifie ...
- java中的异常The given object has a null identifier
修改页面点击提交时报如下异常: org.hibernate.TransientObjectException: The given object has a null identifier: com. ...
- Exception occurred during processing request: The given object has a null identifier: com.zsn.crm.Model.SaleVisit; nested exception is org.hibernate.TransientObjectException: The given object has a nu
edit.jsp页面没有加入隐藏字段 id ,导致模型驱动封装时缺少id ,,调用update更新数据库时出错!
- org.springframework.dao.InvalidDataAccessApiUsageException:The given object has a null identifi的解决方案
异常信息: org.springframework.dao.InvalidDataAccessApiUsageException: The given object has a null identi ...
- hibernate中一种导致a different object with the same identifier value was already associated with the session错误方式及解决方法
先将自己出现错误的全部代码都贴出来: hibernate.cfg.xml <?xml version="1.0" encoding="UTF-8"?> ...
- [转]解决a different object with the same identifier value was already associated with the session错误
1.a different object with the same identifier value was already associated with the session. 错误原因:在h ...
- 解决a different object with the same identifier value was already associated with the session错误
[转]解决a different object with the same identifier value was already associated with the session错误 这个错 ...
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session异常解决办法
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alread ...
随机推荐
- 关于sql server 代理(已禁用代理xp)解决办法
master数据库下执行 sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Agent ...
- Java---IO加强(2)
转换流 ★转换流功能1:充当字节流与字符流之间的桥梁 需求:模拟英文聊天程序,要求: (1) 从键盘录入英文字符,每录一行就把它转成大写输出到控制台: (2) 保存聊天记录到字节流文件. 要求1的设计 ...
- Selenium webdriver 封装与重用
WebDriver对页面的操作,需要找到一个WebElement,然后再对其进行操作,比较繁琐: WebElement element =driver.findElement(By.name(&quo ...
- @RestController
/* * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Vers ...
- 10个提升iOS开发效率的必用工具
Xcode插件 几乎所有开发者都知道Alcatraz是一个开源的包管理工具,可以让我们更轻松地管理各种插件.接下来就介绍下我的最推荐的10个插件: 10.HOStringSense 在编辑字符串的时候 ...
- Java学习路线图·影响一代又一代程序员的经典书籍!(转)
转自:http://www.douban.com/group/topic/50353428/ 基础篇 ·Java核心技术 卷1 基础知识(原书第9版)最新版·中文版 第13届Jolt生产效率大奖获奖图 ...
- Django学习笔记(五)—— 表单
疯狂的暑假学习之 Django学习笔记(五)-- 表单 參考:<The Django Book> 第7章 1. HttpRequest对象的信息 request.path ...
- oracle中split的使用
1.创建自己的类型 VARCHAR2ARRAY CREATE OR REPLACE TYPE "VARCHAR2ARRAY" as table of varchar2(300); ...
- SWFObject文件上传使用记录
SWFObject文件上传使用方法记录,该插件使用起来相当强大也很灵活,与uploadify各有千秋. 值得一说的是,如果要设置button_image_url这个参数,该参数是按钮的背景图,但是一定 ...
- Java基础知识强化96:Calendar类之获取任意年份的2月有多少天的案例
1. 分析: (1)键盘录入任意的年份 (2)设置日历对象的年月日 年:就是(1)输入的数据 月:是2(3月份) 日:是1 (3)把 ...