all loading of objects has to be in the context of a Session.  what  
session should the newly lazy-loaded objects be part of if the parent  
object is not in a session ?  maybe just a temporary one and theyre  
immediately expunged ?  the one associated with the mapper's  
contextual session if any ?

this definitely didnt do the right thing in 0.1.7, im sure it just  
loaded the child objects into the current thread's session.

On Jun 15, 2006, at 4:15 PM, dmiller wrote:

> I finally got the chance to upgrade my application to use SA 0.2.  
> Yay!!
>
> However, I have found a regression. After a session is cleared  
> objects loaded by that session can no longer load related objects.  
> Example:
>
> >>> s = create_session()
> >>> user = s.get(User, 8)
> >>> s.clear()
> >>> user.addresses
> []
>
> The user should actually have 3 addresses, but since the session  
> was cleared the user object is not associated with a session and  
> cannot load its addresses. Is this a bug or did something change  
> that requires objects to be disassociated from their session when  
> the session is cleared? A test is attached.
>
> ~ Daniel
>
>
> <session.py>
> _______________________________________________
> Sqlalchemy-users mailing list
> Sqlalchemy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to