Created
March 14, 2011 09:51
-
-
Save zdavatz/868953 to your computer and use it in GitHub Desktop.
cache_entry.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def odba_retire opts={} | |
# replace with stubs in accessed_by | |
instance = _odba_object | |
if opts[:force] | |
@accessed_by.each do |object_id, odba_id| | |
if item = odba_id2ref(odba_id) | |
item.odba_stubize instance, opts | |
elsif(item = object_id2ref(object_id, odba_id)) | |
if item.is_a?(Persistable) && !item.is_a?(Stub) | |
item.odba_stubize instance, opts | |
end | |
end | |
end | |
@accessed_by.clear | |
@odba_object = nil | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment