> Your TaskExtension class doesn't have a translate_row method, which
> apparently is part of the MapperExtension interface (although it doesn't
> appear in the docs). From the source code (in orm/mapper.py):
>
>     def translate_row(self, mapper, context, row):
>         """Perform pre-processing on the given result row and return a
>         new row instance.
>
>         This is called as the very first step in the ``_instance()``
>         method.
>         """
>
>         return EXT_PASS
>
> You could make life much easier for yourself by making TaskExtension
> inherit from MapperExtension. In that way you would only need to
> implement the methods that you actually want to override, and you won't
> have to update your extension class every time new extension methods are
> added.
>
> Hope that helps,
>
> Simon


>> class TaskExtension(object):

> MapperExtensions need to subclass the MapperExtension class:

> class TaskExtension(MapperExtension):

Thanks a lot Simon, Michael! I did not read the documentation properly
and had missed the inheritence. It indeed makes life a lot simpler.

thanks
Sanjay


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to