Re: [sqlalchemy] base classes that have nothing to do with table inheritence

2009-12-17 Thread Chris Withers
Antoine Pitrou wrote: >> http://groups.google.com/group/sqlalchemy/browse_thread/thread/99812e0ca1f8cc7c# > > Another, not pretty, solution would be to use `exec` with a predefined > string containing the declarations... Er, NO! > Yet another solution is something like: > locals.update((

Re: [sqlalchemy] base classes that have nothing to do with table inheritence

2009-12-17 Thread Antoine Pitrou
Le jeudi 17 décembre 2009 à 11:05 -0500, Michael Bayer a écrit : > Chris Withers wrote: > > > > How should I create a class like this? This isn't about table > > inheritance or the like and I'm *sure* I was told an easy solution for > > this specific use case before, but I can't find it for the lif

Re: [sqlalchemy] base classes that have nothing to do with table inheritence

2009-12-17 Thread Michael Bayer
Chris Withers wrote: > > How should I create a class like this? This isn't about table > inheritance or the like and I'm *sure* I was told an easy solution for > this specific use case before, but I can't find it for the life of me > now... Just gave a current status on this feature three days ag

[sqlalchemy] base classes that have nothing to do with table inheritence

2009-12-17 Thread Chris Withers
Hi All, So, say you have some common methods and field definitions that you want to share across a bunch of mapper classes. My python head says that these should all go in a base class, say, for example: from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.schema import Colum