On Feb 23, 2007, at 1:56 PM, Manlio Perillo wrote:

>
> Hi again.
>
> I have an object attribute loaded via lazy loader.
> This object is loaded in a transaction.
>
> Then, in another transaction, I ussue an update statement (via the sql
> module, not using the orm), that updates the table of the main  
> object's
> attribute.
>
> The problem, now, is that I want to reload this attribute.
>
> I have tried, in a separate transaction:
>     sess.update(obj)
>     sess.expire(obj)
>
> One problem here is that the entire object is reloaded, and I do not
> want this.

i think if you say delattr(obj, attributename), it will do a lazyload  
on the next run.

>
> The other problem (maybe a bug?) is that the orm issue another  
> query to
> reload the data from the database, but in the object I still find the
> old values!
>
> I have submitted a ticket for the last problem (#492).

"refresh-expire" cascade had not yet been implemented, just added it  
in the trunk.



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