---
title: "hibernate column should be mapped with insert=\"false\" update=\"false\""
author: "llhdf"
date: "2010-02-03T15:44:36Z"
tags: []
categories: ["企业架构"]
slug: "hibernate-column-should-be-mapped-with-insert-false-update-false"
draft: false
lastmod: "2010-02-03T15:44:36Z"
id: 586798
url: "https://llhdf.iteye.com/blog/586798"
---

should be mapped with insert="false" update="false

 

&lt;?xml version="1.0"?&gt;  
&lt;!DOCTYPE hibernate-mapping PUBLIC  
 "-//Hibernate/Hibernate Mapping DTD//EN"  
 "[http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd](http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd)" &gt;

&lt;hibernate-mapping package="com.huapu.networkmanage.db.hibernate"&gt;  
 &lt;class  
  name="SyslogLogstack"  
  table="SYSLOG\_LOGSTACK"  
 &gt;  
  &lt;meta attribute="sync-DAO"&gt;false&lt;/meta&gt;  
  &lt;id  
   name="Id"  
   type="integer"  
   column="LOGSTACK\_ID"  
  &gt;  
   &lt;generator class="sequence"&gt;  
              &lt;param name="sequence"&gt;seqportal&lt;/param&gt;  
         &lt;/generator&gt;  
  &lt;/id&gt;

    
  &lt;property  
   name="TargetId"  
   column="TARGET\_ID"  
   type="integer"  
   not-null="false"  
   length="12"  
  /&gt;  
    
  &lt;property  
   name="CollectorId"  
   column="COLLECTOR\_ID"  
   type="integer"  
   not-null="false"  
   length="12"  
  /&gt;  
  &lt;property  
   name="Createtime"  
   column="CREATETIME"  
   type="date"  
   not-null="false"  
   length="7"  
  /&gt;  
  &lt;property  
   name="Facility"  
   column="FACILITY"  
   type="string"  
   not-null="false"  
   length="100"  
  /&gt;  
  &lt;property  
   name="Severity"  
   column="SEVERITY"  
   type="string"  
   not-null="false"  
   length="4"  
  /&gt;  
  &lt;property  
   name="Logmsg"  
   column="LOGMSG"  
   type="string"  
   not-null="false"  
   length="1000"  
  /&gt;  
  &lt;property  
   name="Logtime"  
   column="LOGTIME"  
   type="date"  
   not-null="false"  
   length="7"  
  /&gt;  
    
  &lt;property  
   name="ReferenceId"  
   column="REFERENCE\_ID"  
   type="integer"  
   not-null="false"  
   length="12"  
  /&gt;  
    
  &lt;many-to-one  
   name="target"  
   column="TARGET\_ID"  
   class="DNode"  
   not-null="true"  
  /&gt;     
    
 &lt;/class&gt;   
&lt;/hibernate-mapping&gt;  
   

\--------------------------------------------------------------------------------------------

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

**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")