On Dec 10, 2007, at 4:11 PM, Michael Bayer wrote:
>
> Another example, which we actually support right now...but its because
> a flush occurs:
>
>       x = Foo()
>       x.id = 7
>       for a in x.addresses:   # lazy load of "where x=7".
>>

sorry, scratch that one, its a little nonsensical, replace with:

a = Address()
x = Foo()
x.id = 7
x.addreses.append(a)
assert a.foo_id == 7

which above, is actually doable without a flush.  however to make the  
above work without a flush would be extermely complicating to SA's  
internals right now, since we have built around the model of "no ids  
are available until flush".  which is necessary due to the no native  
ID generators available issue (but also because its nice for ids and  
sequence generators to not fire off before the record is persisted).

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