[CDO] How to find the source of stale CDO-Objects [message #1808784] |
Mon, 01 July 2019 15:00 |
Linuxhippy Mising name Messages: 71 Registered: July 2009 |
Member |
|
|
Hi,
I am currently maintaining a cdo based application (cdo 4.5) backed by an oracle db. I experience an issue with an 1-n relationship which looks like:
site 1<---->n examination
for some reason there exists a site where an examination stays stale - debugging into cdo revealed the call to getRevision returned with null.
However, when looking at the data in the database everything looks fine:
select s.cdo_id, s.CDO_REVISED, s.CDO_VERSION, sl.CDO_IDX, sl.CDO_SOURCE, sl.CDO_VALUE, sl.CDO_VERSION_ADDED, sl.CDO_VERSION_REMOVED, e.CDO_ID, e.CDO_VERSION, e.CDO_REVISED from v1_site s left join v1_site_examinations_list sl on s.CDO_ID=sl.cdo_source left join v1_exam e on sl.cdo_value=e.cdo_id where e.cdo_revised=0 AND s.cdo_revised=0 AND sl.cdo_version_removed IS NULL
390001 0 8 0 390001 410659 7 410659 1 0 <-- stale
390006 0 6 0 390006 390011 5 390011 1 0 <--- all others are ok
417981 0 16 0 417981 418130 3 418130 1 0
417985 0 8 0 417985 418131 3 418131 2 0
417989 0 10 0 417989 418132 3 418132 2 0
417993 0 15 0 417993 418133 3 418133 1 0
also there is an entry in cdo_objects with the id 410659.
Any idea what is going wrong here?
Best regards, Clemens
|
|
|
Re: [CDO] How to find the source of stale CDO-Objects [message #1808816 is a reply to message #1808784] |
Tue, 02 July 2019 09:07 |
|
Quote:select s.cdo_id, s.CDO_REVISED, s.CDO_VERSION, sl.CDO_IDX, sl.CDO_SOURCE, sl.CDO_VALUE, sl.CDO_VERSION_ADDED, sl.CDO_VERSION_REMOVED, e.CDO_ID, e.CDO_VERSION, e.CDO_REVISED from v1_site s left join v1_site_examinations_list sl on s.CDO_ID=sl.cdo_source left join v1_exam e on sl.cdo_value=e.cdo_id where e.cdo_revised=0 AND s.cdo_revised=0 AND sl.cdo_version_removed IS NULL
This does not appear to be the exact query which returned the results you showed. Where is sl.CDO_VERSION_REMOVED?
Quote:390001 0 8 0 390001 410659 7 410659 1 0 <-- stale
I think that sl.CDO_VALUE is what can make a reference stale, CDOID 410659 in your case. Does an object with that CDOID exist?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] How to find the source of stale CDO-Objects [message #1808830 is a reply to message #1808816] |
Tue, 02 July 2019 13:49 |
Linuxhippy Mising name Messages: 71 Registered: July 2009 |
Member |
|
|
Hi Eike,
Thanks a lot for taking the time to look into this :)
Eike Stepper wrote on Tue, 02 July 2019 05:07
This does not appear to be the exact query which returned the results you showed. Where is sl.CDO_VERSION_REMOVED?
Sorry - it seems SQLDeveloper omits NULL-values when using the clipboard. CDO_VERSION_REMOVED was NULL for all rows:
390001 0 8 0 390001 410659 7 NULL 410659 1 0
Quote:I think that sl.CDO_VALUE is what can make a reference stale, CDOID 410659 in your case. Does an object with that CDOID exist?
The content of cdo_objects is:
select * from cdo_objects where cdo_id=410659
410659 -498 1528272051331
also the other end of the relation (exam) seems to be fine:
select cdo_id, cdo_version, cdo_created, cdo_revised,cdo_resource, cdo_container, cdo_feature from v1_exam where cdo_id=410659
410659 1 1528359342356 0 0 390001 -36
So nothing revised or removed - I am quite puzzled :/
Br, Clemens
[Updated on: Tue, 02 July 2019 13:50] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02277 seconds