My  Fault,

session.merge(obj, load=False) should be

obj=session.merge(obj, load=False)



2010/4/17 Paul Balomiri <[email protected]>:
> Hi,
>
> I was just trying to load a relation ( obj.predecessor) for obj.
> obj was created in a session, which has been committed, and closed afterwards.
> I merged obj to the session using
>
> session.merge(obj, load=False)
>
>  but doing so yields this exception:
>
> Parent instance <obj at 0x18817d0> is not bound to a Session; lazy
> load operation of attribute 'predecessor' cannot proceed
>
> without load=False everything is o.k.
>
> I cannot quite understand this behaviour. I thought that load=False
> does not update the object from db, but it merges it as-is to the
> session.
> but perhaps i'm missing some insight...
>
> Paul
>
> --
> [email protected]
>



-- 
[email protected]

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