-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oleg Broytmann schrieb:

> class Device(SQLObject):
>    class sqlmeta:
>       table = 'Device'
> 
>    sysName = StringCol(dbName="sysName", default=None)
> 
> Oleg.

Thanks, this gave me this idea

class Device(SQLObject):
    class sqlmeta:
        fromDatabase = 1
        table = 'Device'

for colname in ['sysName', 'anotherColumn']:
    Device.sqlmeta.columns[colname].dbName = colname

Thus there is no need to redefine the columns, since only the db-names
are changed.

- --
Sch?nen Gru? - Regards
Hartmut Goebel

| Hartmut Goebel             | IT-Security -- effizient |
| [EMAIL PROTECTED] | www.goebel-consult.de    |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iQEVAwUBQ/Bx48zajR0mSa83AQLrRAgAjUlYTPcn4aYNav+b8mbFZ6lT7DZJ9Lxl
h4lqWs5T/9lBPOQYFpjupzOxFKQUzeL7Dfm3UUBytYSvnsF9VUbAu+FD5mcH49/+
8586sc4cantefCajH1ra89W5kZROB5YNjsZUmQlnNksPmrRbj24wG3aMVuO0GhPM
ZstrT9usAsxRmRi9/1QU/UtwRrYQl5Q+ycXauM4qtHR4o65UInC4Rpo2Hea99MSD
er69ARxg60ByMde1sllMfc6t6qu2/fCq7fQkOhH4D9wH7XlBU6sagQuUdv1o7n6g
i3K3Joj+wNKGJjVwuwW43NlLMKHasSjX+Rki6h3jPa+PVk/9LmUa2w==
=f2AH
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to