-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: fake foreign key relation breaks when data doesnt support it
PostPosted: Mon Sep 12, 2005 5:28 pm 
Newbie

Joined: Wed Sep 07, 2005 5:15 pm
Posts: 12
Hi everyone,
I am hoping someone can solve this huge problem of mine.
I am getting a
Hibernate Exception No row with the given identifier exists: [com.dao.IdmsScheduleTable#58800]

What is happening is I am creating a fake foreign key relationship between the sdrl and schedule table using a sdrl_id column. Each schedule will have 1 sdrl assigned to it. Each sdrl can have many to no schedules attached to it.

Well the database has some data issues where in some cases a schedule will have a sdrl id that doesnt have a corresponding record in the sdrl table.

The best solution is to clean up our database and put a real foreign key in it. We do not have time to implement this currently as it would take major coding changes and db cleanup.

I need to find a way for hibernate to ignore this problem and skip over the bad data. I want to pull all the sdrls for my query and ignore the missing foreign key relationship that exists in some rows of schedule data.

Any ideas?

Thanks,
Dave

Hibernate version: 3.1

Mapping documents:
<?xml version="1.0" encoding='UTF-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<!-- DO NOT EDIT: This is a generated file that is synchronized -->
<!-- by MyEclipse Hibernate tool integration. -->
<!-- Created Mon Aug 22 14:54:59 CDT 2005 -->
<hibernate-mapping package="com.dao">

<class name="IdmsSdrlTable" table="IDMS_SDRL_TABLE">
<id name="sdrlId" column="SDRL_ID" type="java.lang.Integer">
<generator class="assigned" />
</id>

<property name="dataItemDesc" column="DATA_ITEM_DESC"
type="java.lang.String" />
<property name="createDate" column="CREATE_DATE"
type="java.util.Date" />
<property name="updateDate" column="UPDATE_DATE"
type="java.util.Date" />
<property name="dataMgmtSig" column="DATA_MGMT_SIG"
type="java.lang.String" />
<property name="primRevSig" column="PRIM_REV_SIG"
type="java.lang.String" />
<property name="buyerSig" column="BUYER_SIG"
type="java.lang.String" />
<property name="scheduleType" column="SCHEDULE_TYPE"
type="java.lang.String" />
<property name="reproduceQty" column="REPRODUCE_QTY"
type="java.lang.String" />
<property name="nonreproduceQty" column="NONREPRODUCE_QTY"
type="java.lang.String" />
<property name="taskReference" column="TASK_REFERENCE"
type="java.lang.String" />
<property name="comments" column="COMMENTS"
type="java.lang.String" />
<property name="firstSubmittal" column="FIRST_SUBMITTAL"
type="java.lang.String" />
<property name="subsequentSubmittal"
column="SUBSEQUENT_SUBMITTAL" type="java.lang.String" />
<property name="remarks" column="REMARKS"
type="java.lang.String" />
<property name="type" column="TYPE" type="java.lang.String" />
<property name="status" column="STATUS" type="java.lang.String" />
<property name="archiveFlag" column="ARCHIVE_FLAG"
type="java.lang.String" />
<property name="dataMgmtSig2" column="DATA_MGMT_SIG2"
type="java.lang.String" />
<property name="notRequiredReason" column="NOT_REQUIRED_REASON"
type="java.lang.String" />
<property name="sdrlNo" column="SDRL_NO"
type="java.lang.String" />

<many-to-one name="idmsDidTable" column="DATA_ITEM"
class="IdmsDidTable" not-null="true" />

<many-to-one name="idmsPartTable" column="PART_ID"
class="IdmsPartTable" not-null="true" />

<set name="schedules" inverse="true" lazy="true">
<key column="sdrl_id"></key>
<one-to-many class="IdmsScheduleTable" />
</set>


</class>

</hibernate-mapping>
<?xml version="1.0" encoding='UTF-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<!-- DO NOT EDIT: This is a generated file that is synchronized -->
<!-- by MyEclipse Hibernate tool integration. -->
<!-- Created Thu Sep 08 13:29:04 CDT 2005 -->
<hibernate-mapping package="com.dao">

<class name="IdmsScheduleTable" table="IDMS_SCHEDULE_TABLE">
<id name="scheduleId" column="SCHEDULE_ID" type="long">
<generator class="assigned"/>
</id>

<property name="sdrlId" column="SDRL_ID" type="long" not-null="true" />
<property name="partId" column="PART_ID" type="long" not-null="true" />
<property name="openDate" column="OPEN_DATE" type="timestamp" />
<property name="closeDate" column="CLOSE_DATE" type="timestamp" />
<property name="status" column="STATUS" type="string" />
<property name="supplierEstDueDate" column="SUPPLIER_EST_DUE_DATE" type="timestamp" />
<property name="supplierDueDate" column="SUPPLIER_DUE_DATE" type="timestamp" />
<property name="supplierSlipDateCnt" column="SUPPLIER_SLIP_DATE_CNT" type="long" />
<property name="supplierCompleteDate" column="SUPPLIER_COMPLETE_DATE" type="timestamp" />
<property name="supplierSig" column="SUPPLIER_SIG" type="string" />
<property name="supplierOrgCode" column="SUPPLIER_ORG_CODE" type="string" />
<property name="supplierStatus" column="SUPPLIER_STATUS" type="string" />
<property name="dataMgmtEstDueDate" column="DATA_MGMT_EST_DUE_DATE" type="timestamp" />
<property name="dataMgmtDueDate" column="DATA_MGMT_DUE_DATE" type="timestamp" />
<property name="dataMgmtSlipDateCnt" column="DATA_MGMT_SLIP_DATE_CNT" type="long" />
<property name="dataMgmtCompleteDate" column="DATA_MGMT_COMPLETE_DATE" type="timestamp" />
<property name="dataMgmtSig" column="DATA_MGMT_SIG" type="string" />
<property name="dataMgmtStatus" column="DATA_MGMT_STATUS" type="string" />
<property name="primaryEstDueDate" column="PRIMARY_EST_DUE_DATE" type="timestamp" />
<property name="primaryDueDate" column="PRIMARY_DUE_DATE" type="timestamp" />
<property name="primarySlipDateCnt" column="PRIMARY_SLIP_DATE_CNT" type="long" />
<property name="primaryCompleteDate" column="PRIMARY_COMPLETE_DATE" type="timestamp" />
<property name="primarySig" column="PRIMARY_SIG" type="string" />
<property name="primaryStatus" column="PRIMARY_STATUS" type="string" />
<property name="buyerEstDueDate" column="BUYER_EST_DUE_DATE" type="timestamp" />
<property name="buyerDueDate" column="BUYER_DUE_DATE" type="timestamp" />
<property name="buyerSlipDateCnt" column="BUYER_SLIP_DATE_CNT" type="long" />
<property name="buyerCompleteDate" column="BUYER_COMPLETE_DATE" type="timestamp" />
<property name="buyerSig" column="BUYER_SIG" type="string" />
<property name="buyerStatus" column="BUYER_STATUS" type="string" />
<property name="boeingEstDueDate" column="BOEING_EST_DUE_DATE" type="timestamp" />
<property name="boeingDueDate" column="BOEING_DUE_DATE" type="timestamp" />
<property name="boeingCompleteDate" column="BOEING_COMPLETE_DATE" type="timestamp" />
<property name="boeingStatus" column="BOEING_STATUS" type="string" />
<property name="resubmitDate" column="RESUBMIT_DATE" type="timestamp" />
<property name="resubmitScheduleId" column="RESUBMIT_SCHEDULE_ID" type="long" />
<property name="dataMgmtEstDueDate2" column="DATA_MGMT_EST_DUE_DATE2" type="timestamp" />
<property name="dataMgmtDueDate2" column="DATA_MGMT_DUE_DATE2" type="timestamp" />
<property name="dataMgmtSlipDateCnt2" column="DATA_MGMT_SLIP_DATE_CNT2" type="long" />
<property name="dataMgmtCompleteDate2" column="DATA_MGMT_COMPLETE_DATE2" type="timestamp" />
<property name="dataMgmtSig2" column="DATA_MGMT_SIG2" type="string" />
<property name="dataMgmtStatus2" column="DATA_MGMT_STATUS2" type="string" />
<property name="createHow" column="CREATE_HOW" type="string" />
<property name="createdBy" column="CREATED_BY" type="string" />
<property name="archiveFlag" column="ARCHIVE_FLAG" type="string" />
<property name="milestoneId" column="MILESTONE_ID" type="long" />
<property name="eicoSig" column="EICO_SIG" type="string" />
<property name="eicoDueDate" column="EICO_DUE_DATE" type="timestamp" />
<property name="eicoEstDueDate" column="EICO_EST_DUE_DATE" type="timestamp" />
<property name="eicoSlipDateCnt" column="EICO_SLIP_DATE_CNT" type="long" />
<property name="eicoStatus" column="EICO_STATUS" type="string" />
<property name="eicoCompleteDate" column="EICO_COMPLETE_DATE" type="timestamp" />
<property name="supplierEcdDate" column="SUPPLIER_ECD_DATE" type="timestamp" />
<property name="supplierEcdComment" column="SUPPLIER_ECD_COMMENT" type="string" />
<property name="supplierEcdCnt" column="SUPPLIER_ECD_CNT" type="long" />
<property name="dataMgmtEcdDate" column="DATA_MGMT_ECD_DATE" type="timestamp" />
<property name="dataMgmtEcdComment" column="DATA_MGMT_ECD_COMMENT" type="string" />
<property name="dataMgmtEcdCnt" column="DATA_MGMT_ECD_CNT" type="long" />
<property name="primaryEcdDate" column="PRIMARY_ECD_DATE" type="timestamp" />
<property name="primaryEcdComment" column="PRIMARY_ECD_COMMENT" type="string" />
<property name="primaryEcdCnt" column="PRIMARY_ECD_CNT" type="long" />
<property name="verifierEcdDate" column="VERIFIER_ECD_DATE" type="timestamp" />
<property name="verifierEcdComment" column="VERIFIER_ECD_COMMENT" type="string" />
<property name="verifierEcdCnt" column="VERIFIER_ECD_CNT" type="long" />
<property name="buyerEcdDate" column="BUYER_ECD_DATE" type="timestamp" />
<property name="buyerEcdComment" column="BUYER_ECD_COMMENT" type="string" />
<property name="buyerEcdCnt" column="BUYER_ECD_CNT" type="long" />

<!-- <set name="idmsSecrevScheduleTableSet" inverse="true">
<key column="SCHEDULE_ID"/>
<one-to-many class="IdmsSecrevScheduleTable"/>
</set> -->

<many-to-one name="sdrl" column="sdrl_id" class="IdmsSdrlTable" not-null="true" />

</class>

</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
Hibernate Exception No row with the given identifier exists: [com.dao.IdmsScheduleTable#58800]


Name and version of the database you are using: Oracle 9
The generated SQL (show_sql=true):
From IdmsSdrlTable sdrl left join fetch sdrl.idmsPartTable left join fetch sdrl.idmsDidTable left join fetch sdrl.schedules where sdrl.archiveFlag = 'N' and sdrl.idmsPartTable.partId in (select part.partId from IdmsPartProgTable ipp, IdmsPartTable part where part.partId = ipp.id.idmsScheduleTable.partId ) and exists (select 'x' from IdmsScheduleTable schedule where schedule.sdrlId = sdrl.sdrlId and trunc(nvl(schedule.buyerCompleteDate, nvl(schedule.buyerDueDate, nvl(schedule.primaryDueDate, nvl(schedule.supplierDueDate, schedule.supplierEstDueDate))))) >= trunc(to_date(:durationFrom , 'MM/DD/YYYY')) and trunc(nvl(schedule.buyerCompleteDate, nvl(schedule.buyerDueDate, nvl(schedule.primaryDueDate, nvl(schedule.supplierDueDate, schedule.supplierEstDueDate))))) <= trunc(to_date(:durationTo , 'MM/DD/YYYY')) )
Hibernate: select idmssdrlta0_.SDRL_ID as SDRL1_11_0_, idmspartta1_.PART_ID as PART1_1_1_, idmsdidtab2_.DATA_ITEM as DATA1_0_2_, schedules3_.SCHEDULE_ID as SCHEDULE1_3_3_, idmssdrlta0_.DATA_ITEM_DESC as DATA2_11_0_, idmssdrlta0_.CREATE_DATE as CREATE3_11_0_, idmssdrlta0_.UPDATE_DATE as UPDATE4_11_0_, idmssdrlta0_.DATA_MGMT_SIG as DATA5_11_0_, idmssdrlta0_.PRIM_REV_SIG as PRIM6_11_0_, idmssdrlta0_.BUYER_SIG as BUYER7_11_0_, idmssdrlta0_.SCHEDULE_TYPE as SCHEDULE8_11_0_, idmssdrlta0_.REPRODUCE_QTY as REPRODUCE9_11_0_, idmssdrlta0_.NONREPRODUCE_QTY as NONREPR10_11_0_, idmssdrlta0_.TASK_REFERENCE as TASK11_11_0_, idmssdrlta0_.COMMENTS as COMMENTS11_0_, idmssdrlta0_.FIRST_SUBMITTAL as FIRST13_11_0_, idmssdrlta0_.SUBSEQUENT_SUBMITTAL as SUBSEQUENT14_11_0_, idmssdrlta0_.REMARKS as REMARKS11_0_, idmssdrlta0_.TYPE as TYPE11_0_, idmssdrlta0_.STATUS as STATUS11_0_, idmssdrlta0_.ARCHIVE_FLAG as ARCHIVE18_11_0_, idmssdrlta0_.DATA_MGMT_SIG2 as DATA19_11_0_, idmssdrlta0_.NOT_REQUIRED_REASON as NOT20_11_0_, idmssdrlta0_.SDRL_NO as SDRL21_11_0_, idmssdrlta0_.DATA_ITEM as DATA22_11_0_, idmssdrlta0_.PART_ID as PART23_11_0_, idmspartta1_.PART as PART1_1_, idmspartta1_.NOMENCLATURE as NOMENCLA3_1_1_, idmspartta1_.EFFECTIVITY as EFFECTIV4_1_1_, idmspartta1_.CREATE_DATE as CREATE5_1_1_, idmspartta1_.UPDATE_DATE as UPDATE6_1_1_, idmspartta1_.DATA_MGMT_SIG as DATA7_1_1_, idmspartta1_.PRIM_REV_SIG as PRIM8_1_1_, idmspartta1_.SEC_REV_SIG as SEC9_1_1_, idmspartta1_.BUYER_SIG as BUYER10_1_1_, idmspartta1_.SUPP_ORG_CODE as SUPP11_1_1_, idmspartta1_.CUSTOMER_CODE as CUSTOMER12_1_1_, idmspartta1_.LEASING_CODE as LEASING13_1_1_, idmspartta1_.SYSTEM_PART_FLAG as SYSTEM14_1_1_, idmspartta1_.SYSTEM_PART_ID as SYSTEM15_1_1_, idmspartta1_.SUBTIER_SUPPLIER as SUBTIER16_1_1_, idmspartta1_.REMARKS as REMARKS1_1_, idmspartta1_.STATUS as STATUS1_1_, idmspartta1_.ONDOCK_DATE as ONDOCK19_1_1_, idmspartta1_.MASTER_CHANGE as MASTER20_1_1_, idmspartta1_.JAA as JAA1_1_, idmspartta1_.COMMODITY_ID as COMMODITY22_1_1_, idmspartta1_.REVIEWER_ORG_CODE as REVIEWER23_1_1_, idmspartta1_.TEMPLATE_NAME as TEMPLATE24_1_1_, idmspartta1_.DATA_MGMT_SIG2 as DATA25_1_1_, idmspartta1_.DISPOSITION as DISPOSI26_1_1_, idmspartta1_.LINE_NUMBER as LINE27_1_1_, idmspartta1_.ROLLOUT_DATE as ROLLOUT28_1_1_, idmspartta1_.RIGHT_ID as RIGHT29_1_1_, idmspartta1_.DISCLAIMER_MESSAGE as DISCLAIMER30_1_1_, idmspartta1_.DISCLAIMER_TYPE as DISCLAIMER31_1_1_, idmspartta1_.DDM_ITAR_FLAG as DDM32_1_1_, idmspartta1_.DDM_CDT_FLAG as DDM33_1_1_, idmspartta1_.DDM_EAR_TEXT as DDM34_1_1_, idmspartta1_.REVISION_LETTER as REVISION35_1_1_, idmspartta1_.REVISION_DATE as REVISION36_1_1_, idmspartta1_.PO_NUMBER as PO37_1_1_, idmsdidtab2_.DATA_ITEM_DESC as DATA2_0_2_, idmsdidtab2_.CREATE_DATE as CREATE3_0_2_, idmsdidtab2_.UPDATE_DATE as UPDATE4_0_2_, idmsdidtab2_.REPRODUCED_QTY as REPRODUCED5_0_2_, idmsdidtab2_.NONREPRODUCED_QTY as NONREPRO6_0_2_, idmsdidtab2_.TASK_REFERENCE as TASK7_0_2_, idmsdidtab2_.COMMENTS as COMMENTS0_2_, idmsdidtab2_.SUPPLIER_UNKNOWN_DUE_DATE as SUPPLIER9_0_2_, idmsdidtab2_.SUPPLIER_UNKNOWN_DUE_DATE2 as SUPPLIER10_0_2_, idmsdidtab2_.DID_REV_DATE as DID11_0_2_, idmsdidtab2_.SEQ as SEQ0_2_, idmsdidtab2_.ACTIVE_FLAG as ACTIVE13_0_2_, idmsdidtab2_.FILENAME as FILENAME0_2_, idmsdidtab2_.SUPP_ORG_CODE as SUPP15_0_2_, idmsdidtab2_.REQ_DOCUMENT as REQ16_0_2_, idmsdidtab2_.REQ_DOCUMENT_REV as REQ17_0_2_, idmsdidtab2_.PARAGRAPH as PARAGRAPH0_2_, idmsdidtab2_.SEDS_FLAG as SEDS19_0_2_, idmsdidtab2_.ENG_SUPPORT_GROUP as ENG20_0_2_, idmsdidtab2_.TSO_DID as TSO21_0_2_, idmsdidtab2_.COM_INC_DID as COM22_0_2_, idmsdidtab2_.ATA_DID as ATA23_0_2_, idmsdidtab2_.PDM_FLAG as PDM24_0_2_, idmsdidtab2_.LIMITED_ACCESS as LIMITED25_0_2_, schedules3_.SDRL_ID as SDRL2_3_3_, schedules3_.PART_ID as PART3_3_3_, schedules3_.OPEN_DATE as OPEN4_3_3_, schedules3_.CLOSE_DATE as CLOSE5_3_3_, schedules3_.STATUS as STATUS3_3_, schedules3_.SUPPLIER_EST_DUE_DATE as SUPPLIER7_3_3_, schedules3_.SUPPLIER_DUE_DATE as SUPPLIER8_3_3_, schedules3_.SUPPLIER_SLIP_DATE_CNT as SUPPLIER9_3_3_, schedules3_.SUPPLIER_COMPLETE_DATE as SUPPLIER10_3_3_, schedules3_.SUPPLIER_SIG as SUPPLIER11_3_3_, schedules3_.SUPPLIER_ORG_CODE as SUPPLIER12_3_3_, schedules3_.SUPPLIER_STATUS as SUPPLIER13_3_3_, schedules3_.DATA_MGMT_EST_DUE_DATE as DATA14_3_3_, schedules3_.DATA_MGMT_DUE_DATE as DATA15_3_3_, schedules3_.DATA_MGMT_SLIP_DATE_CNT as DATA16_3_3_, schedules3_.DATA_MGMT_COMPLETE_DATE as DATA17_3_3_, schedules3_.DATA_MGMT_SIG as DATA18_3_3_, schedules3_.DATA_MGMT_STATUS as DATA19_3_3_, schedules3_.PRIMARY_EST_DUE_DATE as PRIMARY20_3_3_, schedules3_.PRIMARY_DUE_DATE as PRIMARY21_3_3_, schedules3_.PRIMARY_SLIP_DATE_CNT as PRIMARY22_3_3_, schedules3_.PRIMARY_COMPLETE_DATE as PRIMARY23_3_3_, schedules3_.PRIMARY_SIG as PRIMARY24_3_3_, schedules3_.PRIMARY_STATUS as PRIMARY25_3_3_, schedules3_.BUYER_EST_DUE_DATE as BUYER26_3_3_, schedules3_.BUYER_DUE_DATE as BUYER27_3_3_, schedules3_.BUYER_SLIP_DATE_CNT as BUYER28_3_3_, schedules3_.BUYER_COMPLETE_DATE as BUYER29_3_3_, schedules3_.BUYER_SIG as BUYER30_3_3_, schedules3_.BUYER_STATUS as BUYER31_3_3_, schedules3_.BOEING_EST_DUE_DATE as BOEING32_3_3_, schedules3_.BOEING_DUE_DATE as BOEING33_3_3_, schedules3_.BOEING_COMPLETE_DATE as BOEING34_3_3_, schedules3_.BOEING_STATUS as BOEING35_3_3_, schedules3_.RESUBMIT_DATE as RESUBMIT36_3_3_, schedules3_.RESUBMIT_SCHEDULE_ID as RESUBMIT37_3_3_, schedules3_.DATA_MGMT_EST_DUE_DATE2 as DATA38_3_3_, schedules3_.DATA_MGMT_DUE_DATE2 as DATA39_3_3_, schedules3_.DATA_MGMT_SLIP_DATE_CNT2 as DATA40_3_3_, schedules3_.DATA_MGMT_COMPLETE_DATE2 as DATA41_3_3_, schedules3_.DATA_MGMT_SIG2 as DATA42_3_3_, schedules3_.DATA_MGMT_STATUS2 as DATA43_3_3_, schedules3_.CREATE_HOW as CREATE44_3_3_, schedules3_.CREATED_BY as CREATED45_3_3_, schedules3_.ARCHIVE_FLAG as ARCHIVE46_3_3_, schedules3_.MILESTONE_ID as MILESTONE47_3_3_, schedules3_.EICO_SIG as EICO48_3_3_, schedules3_.EICO_DUE_DATE as EICO49_3_3_, schedules3_.EICO_EST_DUE_DATE as EICO50_3_3_, schedules3_.EICO_SLIP_DATE_CNT as EICO51_3_3_, schedules3_.EICO_STATUS as EICO52_3_3_, schedules3_.EICO_COMPLETE_DATE as EICO53_3_3_, schedules3_.SUPPLIER_ECD_DATE as SUPPLIER54_3_3_, schedules3_.SUPPLIER_ECD_COMMENT as SUPPLIER55_3_3_, schedules3_.SUPPLIER_ECD_CNT as SUPPLIER56_3_3_, schedules3_.DATA_MGMT_ECD_DATE as DATA57_3_3_, schedules3_.DATA_MGMT_ECD_COMMENT as DATA58_3_3_, schedules3_.DATA_MGMT_ECD_CNT as DATA59_3_3_, schedules3_.PRIMARY_ECD_DATE as PRIMARY60_3_3_, schedules3_.PRIMARY_ECD_COMMENT as PRIMARY61_3_3_, schedules3_.PRIMARY_ECD_CNT as PRIMARY62_3_3_, schedules3_.VERIFIER_ECD_DATE as VERIFIER63_3_3_, schedules3_.VERIFIER_ECD_COMMENT as VERIFIER64_3_3_, schedules3_.VERIFIER_ECD_CNT as VERIFIER65_3_3_, schedules3_.BUYER_ECD_DATE as BUYER66_3_3_, schedules3_.BUYER_ECD_COMMENT as BUYER67_3_3_, schedules3_.BUYER_ECD_CNT as BUYER68_3_3_, schedules3_.sdrl_id as sdrl69_3_3_, schedules3_.sdrl_id as sdrl69_0__, schedules3_.SCHEDULE_ID as SCHEDULE1_0__ from IDMS_SDRL_TABLE idmssdrlta0_ left outer join IDMS_PART_TABLE idmspartta1_ on idmssdrlta0_.PART_ID=idmspartta1_.PART_ID left outer join IDMS_DID_TABLE idmsdidtab2_ on idmssdrlta0_.DATA_ITEM=idmsdidtab2_.DATA_ITEM left outer join IDMS_SCHEDULE_TABLE schedules3_ on idmssdrlta0_.SDRL_ID=schedules3_.sdrl_id where idmssdrlta0_.ARCHIVE_FLAG='N' and (idmssdrlta0_.PART_ID in (select idmspartta5_.PART_ID from IDMS_PART_PROG_TABLE idmspartpr4_, IDMS_PART_TABLE idmspartta5_, IDMS_SCHEDULE_TABLE idmsschedu6_ where idmspartpr4_.PART_ID=idmsschedu6_.SCHEDULE_ID and idmspartta5_.PART_ID=idmsschedu6_.PART_ID)) and (exists (select 'x' from IDMS_SCHEDULE_TABLE idmsschedu7_ where idmsschedu7_.SDRL_ID=idmssdrlta0_.SDRL_ID and trunc(nvl(idmsschedu7_.BUYER_COMPLETE_DATE, nvl(idmsschedu7_.BUYER_DUE_DATE, nvl(idmsschedu7_.PRIMARY_DUE_DATE, nvl(idmsschedu7_.SUPPLIER_DUE_DATE, idmsschedu7_.SUPPLIER_EST_DUE_DATE)))))>=trunc(to_date(?, 'MM/DD/YYYY')) and trunc(nvl(idmsschedu7_.BUYER_COMPLETE_DATE, nvl(idmsschedu7_.BUYER_DUE_DATE, nvl(idmsschedu7_.PRIMARY_DUE_DATE, nvl(idmsschedu7_.SUPPLIER_DUE_DATE, idmsschedu7_.SUPPLIER_EST_DUE_DATE)))))<=trunc(to_date(?, 'MM/DD/YYYY'))))
Hibernate: select idmspartpr0_.part_id as part3_1_, idmspartpr0_.PART_ID as PART1_1_, idmspartpr0_.PROGRAM_ID as PROGRAM2_1_, idmspartpr0_.PART_ID as PART1_4_0_, idmspartpr0_.PROGRAM_ID as PROGRAM2_4_0_, idmspartpr0_.part_id as part3_4_0_ from IDMS_PART_PROG_TABLE idmspartpr0_ where idmspartpr0_.part_id=?
Hibernate: select idmsschedu0_.SCHEDULE_ID as SCHEDULE1_3_0_, idmsschedu0_.SDRL_ID as SDRL2_3_0_, idmsschedu0_.PART_ID as PART3_3_0_, idmsschedu0_.OPEN_DATE as OPEN4_3_0_, idmsschedu0_.CLOSE_DATE as CLOSE5_3_0_, idmsschedu0_.STATUS as STATUS3_0_, idmsschedu0_.SUPPLIER_EST_DUE_DATE as SUPPLIER7_3_0_, idmsschedu0_.SUPPLIER_DUE_DATE as SUPPLIER8_3_0_, idmsschedu0_.SUPPLIER_SLIP_DATE_CNT as SUPPLIER9_3_0_, idmsschedu0_.SUPPLIER_COMPLETE_DATE as SUPPLIER10_3_0_, idmsschedu0_.SUPPLIER_SIG as SUPPLIER11_3_0_, idmsschedu0_.SUPPLIER_ORG_CODE as SUPPLIER12_3_0_, idmsschedu0_.SUPPLIER_STATUS as SUPPLIER13_3_0_, idmsschedu0_.DATA_MGMT_EST_DUE_DATE as DATA14_3_0_, idmsschedu0_.DATA_MGMT_DUE_DATE as DATA15_3_0_, idmsschedu0_.DATA_MGMT_SLIP_DATE_CNT as DATA16_3_0_, idmsschedu0_.DATA_MGMT_COMPLETE_DATE as DATA17_3_0_, idmsschedu0_.DATA_MGMT_SIG as DATA18_3_0_, idmsschedu0_.DATA_MGMT_STATUS as DATA19_3_0_, idmsschedu0_.PRIMARY_EST_DUE_DATE as PRIMARY20_3_0_, idmsschedu0_.PRIMARY_DUE_DATE as PRIMARY21_3_0_, idmsschedu0_.PRIMARY_SLIP_DATE_CNT as PRIMARY22_3_0_, idmsschedu0_.PRIMARY_COMPLETE_DATE as PRIMARY23_3_0_, idmsschedu0_.PRIMARY_SIG as PRIMARY24_3_0_, idmsschedu0_.PRIMARY_STATUS as PRIMARY25_3_0_, idmsschedu0_.BUYER_EST_DUE_DATE as BUYER26_3_0_, idmsschedu0_.BUYER_DUE_DATE as BUYER27_3_0_, idmsschedu0_.BUYER_SLIP_DATE_CNT as BUYER28_3_0_, idmsschedu0_.BUYER_COMPLETE_DATE as BUYER29_3_0_, idmsschedu0_.BUYER_SIG as BUYER30_3_0_, idmsschedu0_.BUYER_STATUS as BUYER31_3_0_, idmsschedu0_.BOEING_EST_DUE_DATE as BOEING32_3_0_, idmsschedu0_.BOEING_DUE_DATE as BOEING33_3_0_, idmsschedu0_.BOEING_COMPLETE_DATE as BOEING34_3_0_, idmsschedu0_.BOEING_STATUS as BOEING35_3_0_, idmsschedu0_.RESUBMIT_DATE as RESUBMIT36_3_0_, idmsschedu0_.RESUBMIT_SCHEDULE_ID as RESUBMIT37_3_0_, idmsschedu0_.DATA_MGMT_EST_DUE_DATE2 as DATA38_3_0_, idmsschedu0_.DATA_MGMT_DUE_DATE2 as DATA39_3_0_, idmsschedu0_.DATA_MGMT_SLIP_DATE_CNT2 as DATA40_3_0_, idmsschedu0_.DATA_MGMT_COMPLETE_DATE2 as DATA41_3_0_, idmsschedu0_.DATA_MGMT_SIG2 as DATA42_3_0_, idmsschedu0_.DATA_MGMT_STATUS2 as DATA43_3_0_, idmsschedu0_.CREATE_HOW as CREATE44_3_0_, idmsschedu0_.CREATED_BY as CREATED45_3_0_, idmsschedu0_.ARCHIVE_FLAG as ARCHIVE46_3_0_, idmsschedu0_.MILESTONE_ID as MILESTONE47_3_0_, idmsschedu0_.EICO_SIG as EICO48_3_0_, idmsschedu0_.EICO_DUE_DATE as EICO49_3_0_, idmsschedu0_.EICO_EST_DUE_DATE as EICO50_3_0_, idmsschedu0_.EICO_SLIP_DATE_CNT as EICO51_3_0_, idmsschedu0_.EICO_STATUS as EICO52_3_0_, idmsschedu0_.EICO_COMPLETE_DATE as EICO53_3_0_, idmsschedu0_.SUPPLIER_ECD_DATE as SUPPLIER54_3_0_, idmsschedu0_.SUPPLIER_ECD_COMMENT as SUPPLIER55_3_0_, idmsschedu0_.SUPPLIER_ECD_CNT as SUPPLIER56_3_0_, idmsschedu0_.DATA_MGMT_ECD_DATE as DATA57_3_0_, idmsschedu0_.DATA_MGMT_ECD_COMMENT as DATA58_3_0_, idmsschedu0_.DATA_MGMT_ECD_CNT as DATA59_3_0_, idmsschedu0_.PRIMARY_ECD_DATE as PRIMARY60_3_0_, idmsschedu0_.PRIMARY_ECD_COMMENT as PRIMARY61_3_0_, idmsschedu0_.PRIMARY_ECD_CNT as PRIMARY62_3_0_, idmsschedu0_.VERIFIER_ECD_DATE as VERIFIER63_3_0_, idmsschedu0_.VERIFIER_ECD_COMMENT as VERIFIER64_3_0_, idmsschedu0_.VERIFIER_ECD_CNT as VERIFIER65_3_0_, idmsschedu0_.BUYER_ECD_DATE as BUYER66_3_0_, idmsschedu0_.BUYER_ECD_COMMENT as BUYER67_3_0_, idmsschedu0_.BUYER_ECD_CNT as BUYER68_3_0_, idmsschedu0_.sdrl_id as sdrl69_3_0_ from IDMS_SCHEDULE_TABLE idmsschedu0_ where idmsschedu0_.SCHEDULE_ID=?
Hibernate Exception No row with the given identifier exists: [com.dao.IdmsScheduleTable#58800]


Top
 Profile  
 
 Post subject: Re: fake foreign key relation breaks when data doesnt suppor
PostPosted: Mon Sep 12, 2005 5:34 pm 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
dnewman3131 wrote:
Hi everyone,
I am hoping someone can solve this huge problem of mine.
I am getting a
Hibernate Exception No row with the given identifier exists: [com.dao.IdmsScheduleTable#58800]


Add the not-found attribute to your m2o mapping. (the default is exception.)

<many-to-one name="sdrl" column="sdrl_id" class="IdmsSdrlTable" not-null="true" not-found="ignore"/>

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 5:40 pm 
Newbie

Joined: Wed Sep 07, 2005 5:15 pm
Posts: 12
I added that to my mapping and I am still getting the same error.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.