bugfixes
authorzapata <zapata>
Sun, 16 Mar 2003 19:51:35 +0000 (19:51 +0000)
committerzapata <zapata>
Sun, 16 Mar 2003 19:51:35 +0000 (19:51 +0000)
source/mircoders/entity/EntityOther.java
source/mircoders/entity/EntityVideo.java

index 0ec4ad0..e26e5e6 100755 (executable)
@@ -59,8 +59,7 @@ public class EntityOther extends EntityUploadedMedia
   public void update() throws StorageObjectFailure {\r
     super.update();\r
     try {\r
-      theStorageObject.executeUpdate(\r
-          "update content set is_produced='0' where to_media=" + getId());\r
+      theStorageObject.executeUpdate("update content set is_produced='0' where exists(select * from content_x_media where to_content=content.id and to_media=" + getId()+")");\r
     }\r
     catch (SQLException e) {\r
       throwStorageObjectFailure(e, "EntityOther :: update :: failed!! ");\r
index 01c63ee..372306d 100755 (executable)
@@ -66,7 +66,7 @@ public class EntityVideo extends EntityUploadedMedia
     super.update();\r
 \r
     try {\r
-      theStorageObject.executeUpdate("update content set is_produced='0' where to_media=" + getId());\r
+      theStorageObject.executeUpdate("update content set is_produced='0' where exists(select * from content_x_media where to_content=content.id and to_media=" + getId()+")");\r
     }\r
     catch (SQLException e) {\r
       logger.error("EntityVideo.update: " + e.toString());\r