attempted to assign id from null one-to-one property

attempted to assign id from null one-to-one property [com.zfounder.custom.crm.model.CustomerInvestmentInfo.customer];

nested exception is org.hibernate.id.IdentifierGenerationException:

     attempted to assign id from null one-to-one property [com.zfounder.custom.crm.model.CustomerInvestmentInfo.customer]

保存出错

使用

     saveOrUpdate进行保存

 成功

原文地址:https://www.cnblogs.com/liaohongbin/p/7902913.html