Could not synchronize database state with session问题,说保存空
,可以在post.hbm.xml文件里设置inverse="true",这样就可以完美的解决这个问题,主要是person_post里的post为联合主键,它不能为空
或者更新post岗位表时,会更新userrelation表,把bpost更新为空了,这可不行啊
也必须得设置inverse=true;如下图