日期:2014-05-17  浏览次数:21699 次

hibernate update方法无效(急)
我的update方法无效 后台输出 Hibernate: 
    update
        Qs_Score 
    set
        exendt=?,
        exmstate=?,
        extime=?,
        qsdate=?,
        scmeetw=?,
        scmemo=?,
        screcept=?,
        scrst=?,
        strid=?,
        wrexam=? 
    where
        scrid=?


当把update改成merge后 报错

Struts Problem Report

Struts has detected an unhandled exception:

Messages:
ORA-00001: ???????? (ERJUAN.SYS_C0011847)
Could not execute JDBC batch update
Could not execute JDBC batch update; SQL [insert into Qs_Score (exendt, exmstate, extime, qsdate, scmeetw, scmemo, screcept, scrst, strid, wrexam, scrid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
File: oracle/jdbc/driver/DatabaseError.java
Line number: 498

package org.oa.dao;

import java.sql.SQLException;
import java.util.List;

import javax.annotation.Resource;

import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.oa.pojoes.Qs_STRANGER;
import org.oa.pojoes.Qs_Score;
import org.springframework.orm.hibernate3.HibernateCallback;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Component;

import bsh.This;

/**
 * 面试信息的操作方法
 * @author Administrator
 *
 */
@Component(value="ScoreDao")
public class ScoreDaoImpI implements ScoreDaoI
{
private HibernateTemplate hibernateTemplate;

@Resource(name = "sessionFactory")
public void setsessionFactory(SessionFactory sf)