X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=source%2Fmircoders%2Fstorage%2FDatabaseContentToMedia.java;h=5a4201047b8ad503a7a916cfad0bea040634ec70;hb=9065f22c307993d6dd19be86aafcef915f52f36d;hp=2f85cd2876ffedb9bea27e967bf84cf228637ee9;hpb=e70f14a76b41db651fd4618299f046fa715397fe;p=mir.git diff --git a/source/mircoders/storage/DatabaseContentToMedia.java b/source/mircoders/storage/DatabaseContentToMedia.java index 2f85cd28..5a420104 100755 --- a/source/mircoders/storage/DatabaseContentToMedia.java +++ b/source/mircoders/storage/DatabaseContentToMedia.java @@ -51,7 +51,7 @@ public class DatabaseContentToMedia extends Database implements StorageObject{ // get all to_topic from media_x_topic String id = content.getId(); //this is not supported by mysql - String subselect = "id in (select to_media from " + theTable + " where content_id=" + id+")"; + String subselect = "id in (select media_id from " + theTable + " where content_id=" + id+")"; try { returnList = DatabaseMedia.getInstance().selectByWhereClause(subselect,-1); @@ -92,7 +92,10 @@ public class DatabaseContentToMedia extends Database implements StorageObject{ * */ public EntityList getUploadedMedia(EntityContent content) - throws StorageObjectException { + throws StorageObjectException + { + /** @todo this should only fetch published media / rk */ + EntityList returnList=null; if (content != null) { // get all to_topic from media_x_topic @@ -103,6 +106,7 @@ public class DatabaseContentToMedia extends Database implements StorageObject{ try { returnList = DatabaseMedia.getInstance().selectByWhereClause(subselect,"id"); } catch (Exception e) { + e.printStackTrace(); theLog.printDebugInfo("-- get uploadedMedia failed " + e.toString()); throw new StorageObjectException("-- get uploadedMedia failed " + e.toString()); }