("SMARTGPS2006"."BAKTARCORP"."TARGETID") 为 NULL:说明根本没取到值
saveorupdateAll(),中改成对象试试。

解决方案 »

  1.   

    void org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdateAll(Collection entities) throws 
    DataAccessException
     
    这个方法 让传的集合,对象传不了
      

  2.   

    void org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdateAll(Collection entities) throws 
    DataAccessException
     
    这个方法 让传的集合,对象传不了

    用saveorupdate()这个方法
      

  3.   

    void org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdateAll(Collection entities) throws 
    DataAccessException
     
    这个方法 让传的集合,对象传不了

    用saveorupdate()这个方法我知道为啥了。一得一方维护着多的一方。一得一方更新时,也去更新多的一方了。没有多的一方主键值,所以报错。
    解决方法就是让一的一方更新时,不更新多的一方。在一的一方的关联键那配置 update="false"> 就可以了