`
lushuaiyin
  • 浏览: 675743 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

hibernate column should be mapped with insert="false" update="false" 错误原因

 
阅读更多
should be mapped with insert="false" update="false

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="com.huapu.networkmanage.db.hibernate">
<class
name="SyslogLogstack"
table="SYSLOG_LOGSTACK"
>
<meta attribute="sync-DAO">false</meta>
<id
name="Id"
type="integer"
column="LOGSTACK_ID"
>
<generator class="sequence">
<param name="sequence">seqportal</param>
</generator>
</id>


<property
name="TargetId"
column="TARGET_ID"
type="integer"
not-null="false"
length="12"
/>


<property
name="CollectorId"
column="COLLECTOR_ID"
type="integer"
not-null="false"
length="12"
/>
<property
name="Createtime"
column="CREATETIME"
type="date"
not-null="false"
length="7"
/>
<property
name="Facility"
column="FACILITY"
type="string"
not-null="false"
length="100"
/>
<property
name="Severity"
column="SEVERITY"
type="string"
not-null="false"
length="4"
/>
<property
name="Logmsg"
column="LOGMSG"
type="string"
not-null="false"
length="1000"
/>
<property
name="Logtime"
column="LOGTIME"
type="date"
not-null="false"
length="7"
/>

<property
name="ReferenceId"
column="REFERENCE_ID"
type="integer"
not-null="false"
length="12"
/>

<many-to-one
name="target"
column="TARGET_ID"
class="DNode"
not-null="true"
/>


</class>
</hibernate-mapping>

--------------------------------------------------------------------------------------------

不同的属性映射为相同的字段,重复映射同一个字段,就会出现这个错误;

Repeated column in mapping for entity: com.boco.scms.model.ship.order.ShipOrder column: DELIVER_LINKMAN_EMAIL (should be mapped with insert="false" update="false")

虽然是很低级的错误,不过字段很多的情况下,报这样的错还真是让人摸不着头脑,
知道原因的话就查看配置文件,一个一个的过一下
分享到:
评论

相关推荐

    Delphi7.1 Update

    * This update can not be removed after it is installed.* You will need the original Delphi 7 installation CD available to install this update.* To install this update from the CD, insert the CD, and ...

    Hibernate注释大全收藏

    @Column(updatable = false, name = "flight_name", nullable = false, length=50) public String getName() { ... } 定义 name 属性映射到 flight_name column, not null, can't update, length equal 50 @...

    Hibernate注解

    * @Column —— 注解声明了属性到列的映射。该注解有如下的属性 * name 可选,列名(默认值是属性名) * unique 可选,是否在该列上设置唯一约束(默认值false) * nullable 可选,是否设置该列的值可以为空(默认值...

    Hibernate_Annotation关联映射

    对于一对多的双向映射,如果要一对多这一端维护关联关系,你需要删除mappedBy元素并将多对一这端的@JoinColoumn的insertable和updatabel设置为false。这种方案不会得到什么明显的优化,而且还会增加一些附加的UPDATE...

    eclipse错误解决.rar

    有时struts资源文件添加中文保存时会eclipse出现Some characters cannot be mapped using 'ISO-8859-1' character encoding错误不能保存 解决办法

    MemoryMappedFile 使用 共享内存循环读写

    MemoryMappedFile 使用 C# 内存中分配一大块地址. 前边分配一个用与共同配置用 后边N个结构体 for循环建 一般用到此问题,两本程序 一个读一个写 循环读写 ----2015/09/24 Lyndon 上海----

    一个struts2的例子:彻底解决STRUTS2 错误There is no Action mapped for namespace / and action name login

    前几天在网上下载一个struts2的helloword的例子,那个作者也真够缺德的,搞个错误的程序,害得我查了一天的程序错误。 最后发现竟然是struts.xml被写成啦sturts.xml。 碰见这样的问题先鄙视下提供例子的作者, 再...

    .NET4利用MemoryMappedFile实现跨进程多个可执行程序之间的通信

    基于.NET4.0的MemoryMappedFile实现共享内存通信 共享内存通信可以解决跨线程、跨进程、跨EXE之间通信的问题 对于需要传输图片等引用类数据,可以通过序列化和反序列化配合共享内存实现跨进程(跨EXE)通信 共享...

    微软出的WinXP下简易虚拟光驱工具

    System Requirements 短小精悍的XP下虚拟光驱工具 =================== - Windows XP Home or Windows XP Professional ... UNC naming conventions should not be used, however mapped network drives should be OK.

    Memory Mapped File Demo in WinCE

    利用Memory Mapped File实践A,B跨程序的数据交换

    i-vector的工具箱

    Unlike with the global CMVN, for this sample feature stream the overall shape of the feature stream distribution is approximately mapped to a standard normal distribution. ...

    Hibernate注解 关联关系映射注解.docx

    mappedBy属性用法:  该属性与关联关系的维护权相关。  该属性应放在放弃维护权一方。  该属性值为对方的关联属性,表明以后的关联关系将由它来负责。  使用该属性的注解,无需也不能再设置cascade属性。 ...

    mappedBy属性:one2many

    NULL 博文链接:https://605113068.iteye.com/blog/1727088

    MDB: A Memory-Mapped Database and Backend for OpenLDAP

    MDB: A Memory-Mapped Database and Backend for OpenLDAP

    KEGG数据库的使用说明.pdf

    KEGG数据库的使用说明.pdf

    Hibernate注释

    一对多 @OneToMany 注解可定义一对多关联。一对多关联可以是双向的。 双向 规范中多对一端几乎总是双向关联中的主体(owner)端,而一对多的关联注解为 @OneToMany(mappedBy=)

    SSD7 选择题。Multiple-Choice

    For two tables to be union compatible, the tables should be the same with respect to which of the following? (a) keys (b) cardinality (c) name (d) degree Correct answer is (d) Your ...

    微软内部资料-SQL性能优化2

    Contents Module Overview 1 Lesson 1: Memory 3 Lesson 2: I/O 73 Lesson 3: CPU 111 ... It should be pointed out that SQL Server was linked using the /LAREGEADDRESSAWARE flag and can leverage ...

    Visual-Inertial Monocular SLAM with Map Reuse.pdf

    While our approach can be applied to any camera configuration, we address here the most general problem of a monocular camera, with its well-known scale ambiguity. We also propose a novel IMU ...

Global site tag (gtag.js) - Google Analytics