[sqlalchemy] Re: Injecting business objects into constructor

2008-07-16 Thread Heston James - Cold Beans
Hi Rick, I'm not sure where this is going with the 0.5 version, but I believe that MappedClass.__int__ is still not called when objects are loaded from the DB. If that's the case, and there isn't some alternate that SA provides like MappedClass.__onload__, You can look into Mapper

[sqlalchemy] Re: Injecting business objects into constructor

2008-07-16 Thread Rick Morrison
Are you aware of any IoC frameworks which have been adapted to inject/autowire things into SQLAlchemy transient business objects? There was some talk a few months ago about integration of SA with the Trellis component of PEAK, which I think was one of the primary motivators for the user

[sqlalchemy] Re: Injecting business objects into constructor

2008-07-16 Thread Michael Bayer
On Jul 16, 2008, at 6:48 AM, Heston James - Cold Beans wrote: Are you aware of any IoC frameworks which have been adapted to inject/autowire things into SQLAlchemy transient business objects? theres some experiments in IoC for Python if you google around for dependency injection python,

[sqlalchemy] Re: Injecting business objects into constructor

2008-07-16 Thread Heston James - Cold Beans
Hi Michael, theres some experiments in IoC for Python if you google around for dependency injection python, but the Python way is usually focused around not really needing thick layers of abstraction like that. Thanks for that. I did do some googling around a while back when first

[sqlalchemy] Re: Injecting business objects into constructor

2008-07-15 Thread Rick Morrison
I'm not sure where this is going with the 0.5 version, but I believe that MappedClass.__int__ is still not called when objects are loaded from the DB. If that's the case, and there isn't some alternate that SA provides like MappedClass.__onload__, You can look into Mapper Extensions to provide