`
jasin2008
  • 浏览: 68401 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

hibernate报object references an unsaved transient

    博客分类:
  • java
阅读更多
今天在使用hibernate时报object references an unsaved transient instance save the transient instance before flushing的异常。google了一下,说是在manytoone时需要配置many的lazy为false,可能这是一种情况。本次异常的原因是我需要copy一个从数据库load出来的pojo,再去新增该pojo,用到了beanutisl.copyProperties,如果pojo中有set,那么beanutisl.copyProperties为浅拷贝,导致我新建的pojo与load出来的pojo共用一个set,后来在拷贝后需要重新new一个set用于存放新的子表。
分享到:
评论

相关推荐

    10_传智播客JPA详解_JPA中的一对多双向关联与级联操作

    10_传智播客JPA详解_JPA中的一对多双向关联与级联操作.rar

    毕业设计-物流管理系统的设计与实现(java)

    3.Caused by:org.hibernate.TransientObjectException:object references an unsaved transient instance 原因:代码中关联的对象没有set值进去。查看代码,发现是enterPriseStrength和enterprise为多对一

    hibernate4.3.5references chm文档

    hibernate4.3.5references chm文档

    hibernate annotations

    NULL 博文链接:https://xiongjiajia.iteye.com/blog/1947270

    Hibernate References

    * 有人总以为有了关系数据库知识,就能用好Hibernate,这是认识上的误区;很多人总是先有数据表结构,然后使用Hibernate倒推类代码,这是使用上的误区,从对象模型出发才是根本之道。 * 只有真正掌握了OO面向对象...

    Hibernate Reference Documentation3.1

    10.1. Hibernate object states 10.2. Making objects persistent 10.3. Loading an object 10.4. Querying 10.4.1. Executing queries 10.4.1.1. Iterating results 10.4.1.2. Queries that return tuples 10.4.1.3...

    CORBA简单教程(摘自sun microsystem)

    Object References and Requests IDL Type System IDL Type Operations Request Type Checking IDL to Java Binding IDL to Java Compiler Obtaining Object References The Client's Model of Object Creation ...

    object-oriented nonlieanr finite element method

    This article describes an introductory object-oriented finite element program for static and dynamic nonlinear applications. This work can be considered as an extension of the original FEM_Object ...

    Hibernate 中文 html 帮助文档

    10.1. Hibernate对象状态(object states) 10.2. 使对象持久化 10.3. 装载对象 10.4. 查询 10.4.1. 执行查询 10.4.1.1. 迭代式获取结果(Iterating results) 10.4.1.2. 返回元组(tuples)的查询 10.4.1.3. 标量(Scalar)...

    references.zip

    references/detection/engine.py , references/detection/utils.py 和 references/ detection/transforms.py

    hibernate笔记

    3 hibernate annotation references 5 环境准备 5 1 下载hibernate-distribution-3.3.2.GA-dist 5 2 下载hibernate-annotations-3[1].4.0.GA 5 3 注意阅读hibernate compatibility matrix(hibernate 网站download) 5...

    Java API for GitHub

    This library defines an object oriented representation of the GitHub API. By "object oriented" we mean there are classes that correspond to the domain model of GitHub (such as GHUser and GHRepository)...

    References.rar

    References.rar

    Asset Cleaner PRO - Clean - Find References

    Feature 1 - Project Cleaner: 1、Actions for unused files 2、Enhanced Project View Feature 2 - Find References: 1、Find references, usages, relationships easily in ...2、Explore usages & references

    Object-Oriented Software Construction 2nd

    20.5 AN OBJECT-ORIENTED ARCHITECTURE 684 20.6 DISCUSSION 693 20.7 BIBLIOGRAPHICAL NOTE 694 Chapter 21: Inheritance case study: “undo” in an interactive system 695 21.1 PERSEVERARE DIABOLICUM 695 ...

    Laravel开发-static-references-laravel

    Laravel开发-static-references-laravel Laravel应用程序的静态引用

    CDMI (云存储管理接口规范)

    6 - Common Operations Gives an example of the resources that may be accessed and the representations used to modify them 7 - Interface Standard Provides a description of HTTP status codes, Cloud Data ...

    HFSS新旧版本模型转换,优参和脚本语言

    The names in the above hierarchy tree are object references to HFSS Automation object. The process of creating object references is done automatically after starting to record scripts in HFSS.

    xenapi-1.0.6(Xen Management API)

    an object is an instance of a class with its fields set to specific values. Objects are persistent and exist on the server-side. Clients may obtain opaque references to these server-side objects and ...

    vision-references.zip

    torch.vision.references.detection包,集成了train_one_epoch、evaluate等重要函数

Global site tag (gtag.js) - Google Analytics