2.1.4
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping package="gov.ijob.domain.po.talents"> <class name="ResumeJobRequirementPO" table="resume_job_requirement" schema="ijob">
<id name="resumeId" column="RESUME_ID" type="java.lang.String" unsaved-value="none"> <generator class="foreign"> <param name="property">resumeBasicInfoPO</param> </generator> </id> <property name="occupCategory1" column="OCCUP_CATEGORY1" type="java.lang.String"/> <property name="occupation1" column="OCCUPATION1" type="java.lang.String"/> <property name="occupCategory2" column="OCCUP_CATEGORY2" type="java.lang.String"/> <property name="occupation2" column="OCCUPATION2" type="java.lang.String"/> <property name="occupCategory3" column="OCCUP_CATEGORY3" type="java.lang.String"/> <property name="occupation3" column="OCCUPATION3" type="java.lang.String"/> <property name="jobObjective" column="JOB_OBJECTIVE" type="java.lang.String"/> <property name="salaryCurrency" column="SALARY_CURRENCY" type="java.lang.String"/> <property name="salaryMinimum" column="SALARY_MINIMUM" type="java.lang.Double"/> <property name="salaryMaxmum" column="SALARY_MAXMUM" type="java.lang.Double"/> <property name="salaryUnit" column="SALARY_UNIT" type="java.lang.String"/>
<one-to-one name="resumeBasicInfoPO" class="ResumeBasicInfoPO" />
</class> </hibernate-mapping>
resumeJobRequirementPO.setJobObjective(resumeInfoVO.getJobObjective()); resumeJobRequirementPO.setOccupation1(resumeInfoVO.getOccupation1()); resumeJobRequirementPO.setOccupation2(resumeInfoVO.getOccupation2()); resumeJobRequirementPO.setOccupation3(resumeInfoVO.getOccupation3()); resumeJobRequirementPO.setOccupCategory1(resumeInfoVO.getOccupCategory1()); resumeJobRequirementPO.setOccupCategory2(resumeInfoVO.getOccupCategory2()); resumeJobRequirementPO.setOccupCategory3(resumeInfoVO.getOccupCategory3()); resumeJobRequirementPO.setSalaryCurrency(resumeInfoVO.getSalaryCurrency()); resumeJobRequirementPO.setSalaryMaxmum(resumeInfoVO.getSalaryMaxmum()); resumeJobRequirementPO.setSalaryMinimum(resumeInfoVO.getSalaryMinimum()); resumeJobRequirementPO.setSalaryUnit(resumeInfoVO.getSalaryUnit());
..............resumeInfoVO.getResumeId():20050106000009 ..............resumeBasicInfoPO:gov.ijob.domain.po.talents.ResumeBasicInfoPO[hashCode='NoSuchMethodException',resumeId=20050106000009,userId=20041212000001,resumeTitle=resumeTitle,description=description,isActivate=1,style=1,modifyDate=2005-01-07 22:50:17.594,viewTimes=1,resumeContactInfoPO=null,resumeJobRequirementPO=null,resumeAbilityInfoPO=null,talentInfoPO=null,resumeExperienceInfoSet=null,resumeLanguageInfoSet=null,resumeEducationInfoSet=null] ..............:resumeBasicInfoPO updated ..............after persistent resumeBasicInfoPO.getResumeId():20050106000009 ..............resumeContactInfoPO:gov.ijob.domain.po.talents.ResumeContactInfoPO[resumeId=20050106000009,isConfidential=null,isDisplayAddress=null,isDisplayFax=null,isDisplayPhone=null,isDisplayEmail=null,passportNo1=A,passportNo2=BBB,passportNo3=123456789,firstName=BINGLE,middleInitial=null,lastName=giggs,nationality=000001,sex=M,birthdayMonth=11,birthdayDay=12,maritalStatus=G,address=address,address2=null,city=SUZHOU,zipCode=null,country=000001,phoneCountryCode=086,phoneNumber=123456,phoneCountryCode2=null,phoneNumber2=null,phoneExt2=null,faxNumber=null,faxCountryCode=null,email=pop@pop.com,birthdayYear=null,resumeBasicInfoPO=null] ..............resumeId:20050106000009 ..............resumeContactInfoPO:gov.ijob.domain.po.talents.ResumeContactInfoPO[resumeId=20050106000009,isConfidential=null,isDisplayAddress=null,isDisplayFax=null,isDisplayPhone=null,isDisplayEmail=null,passportNo1=A,passportNo2=BBB,passportNo3=123456789,firstName=BINGLE,middleInitial=null,lastName=giggs,nationality=000001,sex=M,birthdayMonth=11,birthdayDay=12,maritalStatus=G,address=address,address2=null,city=SUZHOU,zipCode=null,country=000001,phoneCountryCode=086,phoneNumber=123456,phoneCountryCode2=null,phoneNumber2=null,phoneExt2=null,faxNumber=null,faxCountryCode=null,email=pop@pop.com,birthdayYear=null,resumeBasicInfoPO=gov.ijob.domain.po.talents.ResumeBasicInfoPO[hashCode='NoSuchMethodException',resumeId=20050106000009,userId=20041212000001,resumeTitle=resumeTitle,description=description,isActivate=1,style=1,modifyDate=2005-01-07 22:50:17.594,viewTimes=1,resumeContactInfoPO=null,resumeJobRequirementPO=null,resumeAbilityInfoPO=null,talentInfoPO=null,resumeExperienceInfoSet=null,resumeLanguageInfoSet=null,resumeEducationInfoSet=null]] ..............:resumeContactInfoPO updated ..............resumeJobRequirementPO:gov.ijob.domain.po.talents.ResumeJobRequirementPO[resumeId=null,occupCategory1=000001,occupation1=000001,occupCategory2=null,occupation2=null,occupCategory3=null,occupation3=null,jobObjective=KKKKKKKKKKKKKKKKKKKKK,salaryCurrency=null,salaryMinimum=null,salaryMaxmum=null,salaryUnit=null,resumeBasicInfoPO=gov.ijob.domain.po.talents.ResumeBasicInfoPO[hashCode='NoSuchMethodException',resumeId=20050106000009,userId=20041212000001,resumeTitle=resumeTitle,description=description,isActivate=1,style=1,modifyDate=2005-01-07 22:50:17.594,viewTimes=1,resumeContactInfoPO=null,resumeJobRequirementPO=null,resumeAbilityInfoPO=null,talentInfoPO=null,resumeExperienceInfoSet=null,resumeLanguageInfoSet=null,resumeEducationInfoSet=null]] ..............:resumeJobRequirementPO updated Hibernate: insert into ijob.resume_job_requirement (OCCUP_CATEGORY1, OCCUPATION1, OCCUP_CATEGORY2, OCCUPATION2, OCCUP_CATEGORY3, OCCUPATION3, JOB_OBJECTIVE, SALARY_CURRENCY, SALARY_MINIMUM, SALARY_MAXMUM, SALARY_UNIT, RESUME_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [main] ERROR net.sf.hibernate.util.JDBCExceptionReporter 2005-01-07 22:50:18,235 - ORA-00001: unique constraint (IJOB.PK_RESUME_JOB_REQUIREMENT) violated
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter 2005-01-07 22:50:18,235 - ORA-00001: unique constraint (IJOB.PK_RESUME_JOB_REQUIREMENT) violated
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter 2005-01-07 22:50:18,235 - ORA-00001: unique constraint (IJOB.PK_RESUME_JOB_REQUIREMENT) violated
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter 2005-01-07 22:50:18,235 - ORA-00001: unique constraint (IJOB.PK_RESUME_JOB_REQUIREMENT) violated
[main] ERROR net.sf.hibernate.util.JDBCExceptionReporter 2005-01-07 22:50:18,235 - Could not execute JDBC batch update java.sql.BatchUpdateException: ORA-00001: unique constraint (IJOB.PK_RESUME_JOB_REQUIREMENT) violated
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108) at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:137) at weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_oracle_jdbc_driver_T4CPreparedStatement_813_WLStub.executeBatch(Unknown Source) at weblogic.jdbc.rmi.internal.PreparedStatementStub_weblogic_jdbc_rmi_internal_PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_oracle_jdbc_driver_T4CPreparedStatement_813_WLStub.executeBatch(Unknown Source) at weblogic.jdbc.rmi.SerialPreparedStatement_weblogic_jdbc_rmi_internal_PreparedStatementStub_weblogic_jdbc_rmi_internal_PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_oracle_jdbc_driver_T4CPreparedStatement_813_WLStub.executeBatch(Unknown Source) at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54) at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:126) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2421) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at com.dsii.common.hibernate.HibernateSessionFactory.commitTransaction(HibernateSessionFactory.java:105) at gov.ijob.domain.bean.talents.ResumeBasicInfoBean.saveResumeInfo(ResumeBasicInfoBean.java:830) at gov.ijob.domain.bean.talents.test.ResumeBasicInfoBeanTest.testSaveResumeInfo(ResumeBasicInfoBeanTest.java:393) at gov.ijob.domain.bean.talents.test.ResumeBasicInfoBeanTest.main(ResumeBasicInfoBeanTest.java:49)
oracle 9.2
insert into ijob.resume_job_requirement (OCCUP_CATEGORY1, OCCUPATION1, OCCUP_CATEGORY2, OCCUPATION2, OCCUP_CATEGORY3, OCCUPATION3, JOB_OBJECTIVE, SALARY_CURRENCY, SALARY_MINIMUM, SALARY_MAXMUM, SALARY_UNIT, RESUME_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Debug level Hibernate log excerpt:
i dont know hibernate how to determine when to update ,and when to save
|