Output in the error message the table name and the column name.
state, state_dict, col)
if value is None:
raise orm_exc.FlushError(
- "Can't delete from table "
+ "Can't delete from table %s "
"using NULL for primary "
- "key value")
+ "key value on column %s" % (table, col))
if update_version_id is not None and \
table.c.contains_column(mapper.version_id_col):
s.delete(t1)
assert_raises_message(
orm_exc.FlushError,
- "Can't delete from table using NULL for primary key value",
+ "Can't delete from table t1 using NULL "
+ "for primary key value on column t1.col2",
s.commit
)