On Jul 29, 6:24 pm, Jonathan LaCour <[EMAIL PROTECTED]>
wrote:
> I am having trouble understanding how one is supposed to utilize
> multiple mapper extensions at the same time that override before_update,
> etc.  In the source, I see the `_ExtensionCarrier` class has a method
> called `_do()`:
>
>      def _do(self, funcname, *args, **kwargs):
>          for elem in self.__elements:
>              ret = getattr(elem, funcname)(*args, **kwargs)
>              if ret is not EXT_PASS:
>                  return ret
>          else:
>              return EXT_PASS
>
> It appears that the first MapperExtension to return something other than
> EXT_PASS will prevent any subsequent MapperExtensions from being called.
> How am I supposed to implement two MapperExtensions that each have some
> behavior to perform, say, `before_update`, and have them both be called?

both of your before_update() functions return EXT_PASS.  theyll both
be called.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to