[sqlalchemy] Re: existing database/hibernating

2008-05-21 Thread Gregor Kling
Gregor Kling wrote: Michael Bayer wrote: On May 20, 2008, at 12:15 PM, Gregor Kling wrote: its not going to work if you create the mapper() (and Table) per class instance (i.e. within __init__), It was a typo. It should be all SrvDomainTable. But why shouldn't it work, I already do the test

[sqlalchemy] Re: existing database/hibernating

2008-05-21 Thread Gregor Kling
Michael Bayer wrote: On May 20, 2008, at 12:15 PM, Gregor Kling wrote: its not going to work if you create the mapper() (and Table) per class instance (i.e. within __init__), It was a typo. It should be all SrvDomainTable. But why shouldn't it work, I already do the test and it does. Could

[sqlalchemy] Re: existing database/hibernating

2008-05-20 Thread Michael Bayer
On May 20, 2008, at 12:15 PM, Gregor Kling wrote: > >> its not going to work if you create the mapper() (and Table) per >> class >> instance (i.e. within __init__), > It was a typo. It should be all SrvDomainTable. > But why shouldn't it work, I already do the test and it does. > Could you ple

[sqlalchemy] Re: existing database/hibernating

2008-05-20 Thread Gregor Kling
Michael Bayer wrote: from sqlalchemy import * from sqlalchemy.orm import mapper from dvzrv.db import sAmetaData class SrvDomainTable(object): def __init__(self,domain_name=None,srv_id=None): self.sAtablename = 'srv_domain' self.sAsrv_domain_table = Table(self.sAtablename, sAmeta

[sqlalchemy] Re: existing database/hibernating

2008-05-20 Thread Michael Bayer
On May 20, 2008, at 10:56 AM, Gregor Kling wrote: > Hello Alchemystas, > > I have a legacy database, with a self written ORM not to fuss about. > So I want to use a some more intelligent mechanism - sqlalchemy. > I have written a little hibernator, that does nothing more, as to > ask the databas