Hi,

>ok that exactly cannot be fixed, and i would suggest that you dont  
>use an ORM mapped class as a default value generator.  The reason it  
>cannot is because once the flush() is proceeding, everything which is  
>to be inserted/updated/deleted has been laid out and placed into a  
>queue to be executed.  Any changes to instrumented attributes which  
>occur *within* the flush is not going to get picked up - that train  
>has already left the station.
>  
>
Ok, probably a good time to point out the workaround I was using. In the 
newid function I call ctx.current.flush([s]) where s is the sequence 
object I've just modified. This works fine for me, and now that I've hit 
it once, I'll be able to debug it quickly. My main reason for reporting 
this (beyond general correctness) was that it had caused a 
hard-to-figure-out bug in my app. Perhaps a warning in the docs where 
you mention functions for default values would help.

Paul

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