From: zapata Date: Sun, 16 Mar 2003 19:51:35 +0000 (+0000) Subject: bugfixes X-Git-Tag: BEFORE_MERGE_1_1~209 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=1e496d4c52be4df0689ab6b0bb4a35841b042150;p=mir.git bugfixes --- diff --git a/source/mircoders/entity/EntityOther.java b/source/mircoders/entity/EntityOther.java index 0ec4ad08..e26e5e6e 100755 --- a/source/mircoders/entity/EntityOther.java +++ b/source/mircoders/entity/EntityOther.java @@ -59,8 +59,7 @@ public class EntityOther extends EntityUploadedMedia public void update() throws StorageObjectFailure { super.update(); try { - theStorageObject.executeUpdate( - "update content set is_produced='0' where to_media=" + getId()); + theStorageObject.executeUpdate("update content set is_produced='0' where exists(select * from content_x_media where to_content=content.id and to_media=" + getId()+")"); } catch (SQLException e) { throwStorageObjectFailure(e, "EntityOther :: update :: failed!! "); diff --git a/source/mircoders/entity/EntityVideo.java b/source/mircoders/entity/EntityVideo.java index 01c63eef..372306de 100755 --- a/source/mircoders/entity/EntityVideo.java +++ b/source/mircoders/entity/EntityVideo.java @@ -66,7 +66,7 @@ public class EntityVideo extends EntityUploadedMedia super.update(); try { - theStorageObject.executeUpdate("update content set is_produced='0' where to_media=" + getId()); + theStorageObject.executeUpdate("update content set is_produced='0' where exists(select * from content_x_media where to_content=content.id and to_media=" + getId()+")"); } catch (SQLException e) { logger.error("EntityVideo.update: " + e.toString());