i have such thing implemented externaly but it is definitely not nice (read: tricky and underground) - replacing the __dict__ with something handmade that does what i say as i say if i say. that's dbcook's reflector for my static_type structures; look in dbcook/usage/static_type if interested. and it is now broken with the latest instance_state handling mechanism.
another, similar or not, feature i needed while doing dbcook, was a readonly/loadonly mapper; i.e. a mapper for a sort-of intermediate base-class which should not have its own instances; only subclasses may have instances/DB-footprint. That i made via MapperExt, throwing at before_insert/update/delete. Rick Morrison wrote: > Something like this is available on a roll-your-own basis via Python > properties along with some mapper tricks: > > > http://www.sqlalchemy.org/docs/04/mappers.html#advdatamapping_mapper_overriding > > I would be +1 for such a feature implemented on mapped instances, could be > useful for detecting those hard-to-find bugs, but I can't think of a nice > and simple API for it. For mapped instances via Query(), it could be an > .option(), but I can't see a good way for its use on relation()s. Also not > sure if such a feature would throw an exception on attribute setting, or > whether it ought to simply be ingored during a flush (OIOW, have it's > "dirty" flag locked down to False) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---