For your call to mapper.populate_instance, you have the arguments for 'row'
and 'instance' reversed.
On Tue, Apr 8, 2008 at 6:56 AM, Sanjay <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> In a project, I am using MapperExtension this way:
>
> class TaskExtension(MapperExtension):
> def populate_instance(self, mapper, selectcontext, row, instance,
> **flags):
> mapper.populate_instance(selectcontext, row, instance,
> **flags)
> instance.on_load() # does some custom initialization
>
> It gives me the following exception:
>
> TypeError: ("'Task' object is unsubscriptable"...
>
> Needing help.
>
> thanks
> Sanjay
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---