ssh集成关于hibernate问题
Hibernate: update QMAX_GSM_EX_PLAN_GAGES set EXAMINE_PLAN_ID=null where EXAMINE_PLAN_ID=?
[log4j] [ERROR] org.hibernate.util.
JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.java:72) - ORA-01407: 无法更新 ("GSM"."QMAX_GSM_EX_PLAN_GAGES"."EXAMINE_PLAN_ID") 为 NULL
[log4j] [ERROR] org.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.java:72) - ORA-01407: 无法更新 ("GSM"."QMAX_GSM_EX_PLAN_GAGES"."EXAMINE_PLAN_ID") 为 NULL
[log4j] [ERROR] org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:301) - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException:
Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
我在删除时报这种异常,请问怎么解决,急!
------解决方案--------------------EXAMINE_PLAN_ID
LZ的这个字段,不是主键,要不就是有外键约束,或者有非空设置。
------解决方案--------------------EXAMINE_PLAN_ID 字段是否有非空的约束
------解决方案--------------------可能是.hbm.xml的问题,一对多中维护关系交给了哪一方,发.hbm.xml看下