[mirrorbrain-commits] [opensuse-svn] r6529 - trunk/tools/download-redirector-v2/mirrordoctor/mb

From: Novell Forge SVN <noreply_at_novell.com>
Date: Sat, 21 Feb 2009 12:17:05 -0700 (MST)
Author: poeml
Date: 2009-02-21 12:17:02 -0700 (Sat, 21 Feb 2009)
New Revision: 6529

Modified:
   trunk/tools/download-redirector-v2/mirrordoctor/mb/conn.py
Log:
mb tool: 
 - work around the requirement of SQLObject to have a primary key in each table,
   by simulating one for it


Modified: trunk/tools/download-redirector-v2/mirrordoctor/mb/conn.py
===================================================================
--- trunk/tools/download-redirector-v2/mirrordoctor/mb/conn.py	2009-02-21 19:14:28 UTC (rev 6528)
+++ trunk/tools/download-redirector-v2/mirrordoctor/mb/conn.py	2009-02-21 19:17:02 UTC (rev 6529)
_at_@ -123,11 +123,14 @@
                 fromDatabase = True
         self.File = File
 
-        class FileServer(SQLObject):
+        # FileServerWithpk is a view of the file_server table, with a
+        # simulated primary key that this ORM requires.
+        class FileServerWithpk(SQLObject):
             """the file_server table"""
-            class sqlmeta:
-                fromDatabase = True
-        self.FileServer = FileServer
+            fileid = IntCol()
+            serverid = IntCol()
+            timestamp_scanner = IntCol()
+        self.FileServer = FileServerWithpk
 
         class Marker(SQLObject):
             """the marker table"""

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Sat Feb 21 2009 - 19:17:40 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT