忘记贴异常了
ERROR [org.hibernate.event.def.AbstractFlushingEventListener] - Could not synchronize database state with session
org.hibernate.HibernateException: Unable to resolve property: depCode

解决方案 »

  1.   

    <class name="com.mobilecn.digicampus.xgxt.common.bean.XgGgBj" table="XG_GG_BJ" > 
    <many-to-one name="xgGgDepartment"    class="com.mobilecn.digicampus.xgxt.common.bean.XgGgDepartment"  fetch="select"> 
                <column name="SSXYDM" length="4" property-ref="depCode"/> 
    </many-to-one> 
    </class>
    你将property-ref="depCode"放到column标签中试试!

      

  2.   

    column没有property-ref属性吧,直接文件错误呢
      

  3.   

    看看你的SSXYDM跟depCode类型是否匹配
      

  4.   

    匹配。不过发现问题了。不知道谁把xgGgDepartment的id改成了depCode,原来不是的。
    好像说property-ref="非id"。http://forum.springframework.org/archive/index.php/t-41687.html
    靠,我郁闷,找了半天。funck