映射文件字段类型与实体类属性类型不一致导致的异常

org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of com.tanist.netmanager.light.entities.BusManage was altered from 5 to 5; nested exception is org.hibernate.HibernateException: identifier of an instance of com.tanist.netmanager.light.entities.BusManage was altered from 5 to 5

<hibernate-mapping>
    <class name="com.tanist.netmanager.light.entities.TransformerManage" table="transformermanage">
        <id name="id" type="java.lang.Integer">
            <column name="id"/>
            <generator class="native" />
        </id>

  

public class TransformerManage implements Serializable {
	/**
	 * <pre>
	 * 
	 * </pre>
	 */
	private static final long serialVersionUID = 6578432901946569440L;
	/**
	 * 主键
	 */
	private long id;

 由于实体类中的主键类型与映射文件里的字段类型不一致导致的哦无法转化,

你可能感兴趣的:(spring,Hibernate)