You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a query which increments the column by one:
query = (
update(Table)
.filter(Table.id == '123')
.values(counter=Table.counter + 1)
)
session.connection().execute(query)
This issues
ALTER TABLE table UPDATE counter = (table.counter + 1)
and database complains about "table.counter"
This can be probably fixed by not including table name while calling _get_crud_params, but I do not know if it would have negative side effects for some updates which use select from multiple tables, etc.
def visit_update(self, update_stmt, **kw):
....
crud_params = crud._get_crud_params(
self, update_stmt, compile_state, True, ==>>include_table=False<<==, **kw
)
Version 0.3.0 with sqlalchemy 2.0.25
The text was updated successfully, but these errors were encountered:
I have a query which increments the column by one:
query = (
update(Table)
.filter(Table.id == '123')
.values(counter=Table.counter + 1)
)
session.connection().execute(query)
This issues
ALTER TABLE table UPDATE counter = (table.counter + 1)
and database complains about "table.counter"
This can be probably fixed by not including table name while calling _get_crud_params, but I do not know if it would have negative side effects for some updates which use select from multiple tables, etc.
def visit_update(self, update_stmt, **kw):
....
crud_params = crud._get_crud_params(
self, update_stmt, compile_state, True, ==>>include_table=False<<==, **kw
)
Version 0.3.0 with sqlalchemy 2.0.25
The text was updated successfully, but these errors were encountered: