When we delete at the element level the element is
deleted and all
references to that asset is deleted from the ELEMENT
table and the Marked
for Trash in the ALL_ASSET_REOCRD table is set.
When we delete at the asset type level the asset type
bucket and the element
is deleted and all references to that asset are deleted
from the ELEMENT
and BUCK_3 tables and the Marked for Trash in the
ALL_ASSET_REOCRD table
is set to "Y".
When we delete at the higher bucket level (BUCK_2) the
asset type information is
removed from BUCK_3 but the element information in the
ELEMENT table
is not changed and the Marked for Trash in the
ALL_ASSET_REOCRD table is
still set to "N". The same for all upper level buckets
holds true.
Logged In: YES
user_id=788646
I have confirmed the behavior that you describe with one
minor addition. If you delete buckets from the bottom up the
records in all_asset_duplicate and all_asset_record are
properly handled. It appears that the case where a bucket
contains any other bucket is not properly handled. We will
log this as an issue.
In the meantime, your workaround is to start at the bottom
bucket with assets and work up to the point where you have
deleted all the buckets that contain assets. At that point
you can go to the top of the tree and delete from the
highest level.
An example:
Bucket 1
Bucket 2a
Element
Assets
Bucket 2b
Element
Assets
If you delete Bucket 2a and 2b individually everything is
fine. If you delete bucket 1 it behaves as you have noted
leaving orphan records in all_asset_duplicate and _record
and not setting mark_trash = 'Y'.