Re: Errors with SqlSoup
"Jonathan Ellis" <[email protected]> Sun, 27 Aug 2006 15:16:40 -0700
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 27 Aug 2006 22:01:50 +0100, "Rui Coelho Justino" <[email protected]> said: > The error that it gives me is: > ----- > Spyce exception > File: /home/user/project/login/x/index.spy > Message: > ArgumentError: Could not assemble any primary key columns for mapped > table 'users' > If i use it like this: > > globals['db'] = > sqlalchemy.BoundMetaData('postgres://sss:aaa@localhost/db') > > And in the scripts call: > spyceConfig.sqlalchemy.Table('users', db, autoload=True) > > It works fine. That just loads the table, though; it doesn't create a mapper for it, like SqlSoup does. To load it you don't need a primary key, but you do if you want to map it. An unmapped Table isn't very useful. -J -- C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642