[sqlalchemy] Re: Help! More Class->Mapper confusion!

2009-03-11 Thread Michael Bayer
On Mar 11, 2009, at 6:05 PM, batraone wrote: > > Thanks. I don't have control over the instance creation. These pre- > created objects are handed down to me. I could create an adapter that > maps the original class to the one that has been mapped but this is > quite a bit of work as I have to ma

[sqlalchemy] Re: Help! More Class->Mapper confusion!

2009-03-11 Thread batraone
Thanks. I don't have control over the instance creation. These pre- created objects are handed down to me. I could create an adapter that maps the original class to the one that has been mapped but this is quite a bit of work as I have to manually copy over each of the source class attributes to m

[sqlalchemy] Re: Help! More Class->Mapper confusion!

2009-03-11 Thread Michael Bayer
batraone wrote: > def map(self, myfoo): > 'Creates the map. ' > > orm.mapper(Foo, self.t_foo, column_prefix = '_') > > # Add foo to the database > print dir(myfoo) # where did _name go?, _phone is there! > > mf2 = Foo() # ok, let's create a new one. >