oracle8.1.6 select r.mime_type, i.storage_type, i.storage_area_key, r.revision_id, r.content_length from cr_revisions r, cr_items i where i.item_id = r.item_id and r.revision_id = content_item.get_live_revision(:item_id) select :path || filename from cr_revisions where revision_id = :revision_id select content from cr_revisions where revision_id = $revision_id begin content_type.register_mime_type('content_revision', :mime_type); end; select content_item.is_subclass(:image_type, 'image') from dual select content_item.is_subclass(:other_type, 'content_revision') from dual begin :1 := image.new( name => :object_name, parent_id => :parent_id, item_id => :item_id, revision_id => :revision_id, mime_type => :mime_type, creation_user => :creation_user, creation_ip => :creation_ip, title => :title, content_type => :image_type, storage_type => :storage_type, height => :original_height, width => :original_width, package_id => :package_id ); end; begin :1 := image.new_revision ( item_id => :item_id, revision_id => :revision_id, title => :title, description => :description, mime_type => :mime_type, creation_user => :creation_user, creation_ip => :creation_ip, height => :original_height, width => :original_width, package_id => :package_id ); end; begin :1 := content_item.new( name => :object_name, item_id => :item_id, parent_id => :parent_id, context_id => :parent_id, creation_user => :creation_user, creation_ip => :creation_ip, content_type => :other_type, storage_type => :storage_type, package_id => :package_id ); end; begin :1 := content_revision.new ( title => :title, description => :description, mime_type => :mime_type, item_id => :item_id, revision_id => :revision_id, creation_user => :creation_user, creation_ip => :creation_ip, package_id => :package_id, filename => :object_name ); end; update cr_revisions set mime_type = :mime_type, content = empty_blob() where revision_id = :revision_id returning content into :1 update cr_revisions set content_length = dbms_lob.getlength(content) where revision_id = :revision_id begin content_item.set_live_revision (revision_id => :revision_id); end; update cr_revisions set filename = :filename, mime_type = :mime_type, content_length = :tmp_size where revision_id = :revision_id