* mercoledì 13 giugno 2007, alle 09:15, Michael Bayer wrote :
> SQLAlchemy's ORM relies upon cursor.rowcount after an UPDATE or
> DELETE to get the number of rows affected. Why exactly does your rule
> cause this to fail ?
because is a 'INSTEAD RULE' .... the base table 'prev' has no row ...
the table 'prev2007' INHERITS from 'prev' ...
and the db return a rowcount of '0' although the row is updated into
'prev2007' ...
CREATE RULE previsione2007_upd AS ON UPDATE TO rsm.prev
WHERE NEW.data_m BETWEEN '1/1/2007' AND '31/12/2007'
DO INSTEAD UPDATE rsm.prev2007
SET nave_id = NEW.nave_id,
...
> if no way around that, id have to provide a
> hook into the postgres.py dialect to disable "rowcount".
> you might
> want to experiment with raw DBAPI code and see if you can get
> cursor.rowcount to behave properly in conjunction with your database
> setup.
I'll try ... tanks for the answer ..
--
#include <stdio.h>
int main(void){char c[]={10,65,110,116,111,110,105,111,32,98,97,114,98,111,110,
101,32,60,104,105,110,100,101,109,105,116,64,116,105,115,99,97,108,105,110,101,
116,46,105,116,62,10,10,0};printf("%s",c);return 0;}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---