thats actually a huge pain in the butt to fix because there is an  
implicit behavior behind:

        users.insert().execute({'a':1, 'b':2, 'c'3}, {<dict2>}, {<dict3>}, ...)

in that its the same as saying:

        users.insert(values={'a':1, 'b':2, 'c'3}).execute({'a':1, 'b':2,  
'c'3}, {<dict2>}, {<dict3>}, ...)

i.e. the statement is compiled against the parameters in the first  
element of execute arguments.  so they take place for subsequent  
execute arguments that dont override them.

awareness would have to be added to ClauseElement/ANSICompiler to  
differentiate between compiled-in parameters and compiled-in  
parameters that came from execute params, and compiled.get_params()  
would have to check the incoming params against the original execute- 
params and raise an error if keys dont match.

so sure add a ticket for this for me and just put both emails here  
in...im far behind on tickets at this point.

On Mar 26, 2007, at 2:00 PM, Mel Collins wrote:

>
>  When you do a multiple-row insert, such as:
> users.insert().execute(
>     {'user_id':6, 'user_name':'jack', 'password':'asdfasdf'},
>     {'user_id':7, 'user_name':'ed'},
>     {'user_id':8, 'user_name':'scott', 'password':'fadsfads'},
>     {'user_id':9, 'user_name':'bob'},
> )
>  ...the 'password' field for the second and fourth rows, rather than
> being set to None or raising an error, take the first row's password
> value.
>  While it is somewhat slack not to provide all the columns for each
> row, SA shouldn't really duplicate the first row's values, nei?
>
>  I'm this >| |< far from submitting a bug report this time. ;)
>
>  Takk,
>  - Mel C
>
>
> >


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