Hi all,
....
Module sqlalchemy.engine.base:*1180* in |__execute_context
||context*.*parameters*[**0**]**,* context*=*context*)*|
Module sqlalchemy.engine.base:*1249* in |_cursor_execute||
self*.*_handle_dbapi_exception*(*e*,* statement*,* parameters*,*
cursor*,* context*)*|
Module sqlalchemy.engine.base:*1247* in |_cursor_execute|
|self*.*dialect*.*do_execute*(*cursor*,* statement*,* parameters*,*
context*=*context*)*|
Module sqlalchemy.engine.default:*266* in |do_execute|
<http://tg11.sferacarta.com:8000/operatore/save#>
|cursor*.*execute*(*statement*,* parameters*)*|
*IntegrityError: ('(IntegrityError) null value in column "id" violates
not-null constraint\n', <bound method Controller.save of
<sicer.BASE.controller.authentication.operatore.Controller object at
0x4e178d0>>) 'UPDATE anagrafica SET id=%(id)s, telefono=%(telefono)s,
ts_ultima_modifica=%(ts_ultima_modifica)s,
id_operatore=%(id_operatore)s, tipo=%(tipo)s WHERE anagrafica.id =
%(anagrafica_id)s' {'ts_ultima_modifica': None, 'tipo': None,
'anagrafica_id': 141092, 'telefono': None, 'id': None, 'id_operatore':
1695}* |<<
<http://tg11.sferacarta.com:8000/operatore/save#>
context*.*cursor*,*
context*.*statement*,*
context*.*parameters*[**0**]**,*
context*=*context*)*
*if* context*.*compiled*:*| |<<
<http://tg11.sferacarta.com:8000/operatore/save#>
self.dialect.do_execute(cursor, statement, parameters, context=context)
except Exception, e:
self._handle_dbapi_exception(e, statement, parameters,
cursor, context)
raise
| |<< <http://tg11.sferacarta.com:8000/operatore/save#>
self.engine.logger.info("%r", parameters)
try:
self.dialect.do_execute(cursor, statement, parameters,
context=context)
except Exception, e:
self._handle_dbapi_exception(e, statement, parameters,
cursor, context)| |<< <http://tg11.sferacarta.com:8000/operatore/save#>
*def* *do_execute**(**self**,* *cursor**,* *statement**,*
*parameters**,* *context**=*None*)**:*
cursor*.*execute*(*statement*,* parameters*)*
*def* *is_disconnect**(**self**,* *e**)**:*|
-----------------------------------------------------------------------
I'm using column_prefix, but seems sa compiles this query without prefix,
furthermore it try to update the primary key with a NULL value.
*'UPDATE anagrafica
SET id=%(id)s,
telefono=%(telefono)s,
ts_ultima_modifica=%(ts_ultima_modifica)s,
id_operatore=%(id_operatore)s,
tipo=%(tipo)s
WHERE anagrafica.id = %(anagrafica_id)s'
*| <http://tg11.sferacarta.com:8000/operatore/save#> *def*
*do_execute**(**self**,* *cursor**,* *statement**,* *parameters**,*
*context**=*None*)**:*
cursor*.*execute*(*statement*,* parameters*)*
*def* *is_disconnect**(**self**,* *e**)**:*|
class Anagrafica():
pass
mapper(Anagrafica,
tbl['anagrafica'],
column_prefix = 'anagrafica_',
extension=History(),
)
The migration from 0.3 to 0.6 is too hard. :-(
j
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.