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
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