On Thursday, February 9, 2012 3:10:52 AM UTC-5, scausten wrote:
>
> Is is possible to hold a record in session, something like: 
>
> id = db.transactions.insert() 
> session.transaction = db.transactions[id] 
>
> and directly update_record the session.transaction, 
>
> session.transaction.update_record(x=y)        # This throws KeyError: 
> 'update_record'
>

When a Row is stored in the session, it is converted to a dict and loses 
its update_record() method (only the field values are stored in the dict). 
Upon retrieval from the session, it is converted back to a Row object but 
no longer has the update_record() method, hence the KeyError.

Anthony

Reply via email to