[rygel] media-db: Fix deletion of containers



commit 4ad3cb4348a851ed92fd23dc4a0e5f24b6856eb9
Author: Jens Georg <mail jensge org>
Date:   Sat Mar 20 15:46:11 2010 +0100

    media-db: Fix deletion of containers
    
    Use SQL IN keyword to actually delete the list of descendants, not the
    first one only.

 src/rygel/rygel-media-db.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-media-db.vala b/src/rygel/rygel-media-db.vala
index 4f16a2b..6dad3c9 100644
--- a/src/rygel/rygel-media-db.vala
+++ b/src/rygel/rygel-media-db.vala
@@ -145,7 +145,7 @@ public class Rygel.MediaDB : Object {
     "DELETE FROM Uri WHERE object_fk = ?";
 
     private const string DELETE_BY_ID_STRING =
-    "DELETE FROM Object WHERE upnp_id = " +
+    "DELETE FROM Object WHERE upnp_id IN " +
         "(SELECT descendant FROM closure WHERE ancestor = ?)";
 
     private const string GET_OBJECT_WITH_CLOSURE =



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]