On Jan 16, 2008, at 7:32 PM, Rick Morrison wrote:

> I still have no answer as to what this might be, but I am starting  
> to see it more often.
>
> It's now biting me a bit harder as it's beginning to happen on items  
> that I cache on startup and then .expunge(). When I later go to  
> access a relation on the expunged item, the trigger of the lazy  
> loader fails. Looks like it may be becoming a bad idea to rely on  
> eager fetches....

start adding a layer of assertion to your app.  try ensuring that none  
of the desired objects are present in the session beforehand, and that  
afterwards they are all there and the __dict__ contains the full  
collections.   since it seems like you have very specific areas where  
you know eager loading is to occur you should start trying to narrow  
down where its happening.  also try putting exception throws in  
sqlalchemy itself - like inside of mapper._instance(), at the point  
where it loads an object thats already present and skips loading its  
attributes....hardcode some assertions there specific to your  
application, possibly relying upon some globals that you set before  
and after the load operation.  do the same inside of strategies.py at  
the point wehre it says "degrading to lazy loader", etc.


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