OpenStack Common DB Code
Go to file
Mike Bayer af4b2263e4 Resolve SAWarning in Query.soft_delete()
We currently see a lot of warnings like this from
the soft_delete() method:

  sqlalchemy.exc.SAWarning: Evaluating non-mapped column expression
  'updated_at' onto ORM instances; this is a deprecated use case.
  Please make use of the actual mapped columns in ORM-evaluated
  UPDATE / DELETE expressions.

This is because the "evaluate" synchronization strategy would like
to search for objects and update them based on the UPDATE criteria
passed, however the columns given, literal_column('id'),
literal_column('updated_at'), are not mapped to anything. The
evaluator has to make a guess that the string contained in these
expressions should be matched to a mapped attribute on the given
entity and this guess was first removed in [1], then added back in
[2] with a warning (likely since oslo.db is invoking it).

This uses the actual entity-mapped column for the query rather
than the literal string column.

[1] https://docs.sqlalchemy.org/en/latest/changelog/changelog_12.html#change-b1e620dece39006ab44c47044e9a6fee
[2] https://docs.sqlalchemy.org/en/latest/changelog/changelog_12.html#change-dff3a469788c81a46440584406cb22be

Change-Id: I192e84ce757d12d33085a209dd58d8ea46fb90fb
Closes-Bug: #1814199
2019-02-01 11:57:40 -05:00
doc List PyMySQL first in installation docs 2018-04-24 14:20:12 +00:00
oslo_db Resolve SAWarning in Query.soft_delete() 2019-02-01 11:57:40 -05:00
releasenotes Add "is_started" flag to enginefacade 2018-10-24 13:45:50 -04:00
tools Switch to stestr 2018-07-13 10:18:54 +07:00
.coveragerc Fix coverage configuration and execution 2015-10-08 17:29:42 -04:00
.gitignore Clean up .gitignore references to personal tools 2018-10-15 11:47:25 +08:00
.gitreview Fix .gitreview for oslo.db 2014-04-30 16:55:51 +02:00
.mailmap Fix the graduate.sh script result 2014-04-18 11:33:16 +03:00
.stestr.conf Switch to stestr 2018-07-13 10:18:54 +07:00
.zuul.yaml Use template for lower-constraints 2018-12-20 20:11:10 +01:00
CONTRIBUTING.rst Drop MySQL-python dependency from oslo.db 2017-10-17 07:17:06 +02:00
HACKING.rst Update URLs according to document migration 2017-07-11 22:28:01 +08:00
LICENSE Fix the graduate.sh script result 2014-04-18 11:33:16 +03:00
README.rst Add release notes to README.rst 2018-06-21 13:16:03 +08:00
babel.cfg Fix the graduate.sh script result 2014-04-18 11:33:16 +03:00
lower-constraints.txt Switch to stestr 2018-07-13 10:18:54 +07:00
requirements.txt Remove most server_default comparison logic 2018-06-15 13:31:38 +10:00
setup.cfg Update mailinglist from dev to discuss 2018-12-05 09:38:17 +08:00
setup.py Updated from global requirements 2017-03-03 00:03:00 +00:00
test-requirements.txt Update hacking version 2019-01-03 00:53:13 +08:00
tox.ini Don't quote {posargs} in tox.ini 2018-10-09 13:35:12 +00:00

README.rst

Team and repository tags

image

oslo.db -- OpenStack Database Pattern Library

Latest Version

Downloads

The oslo db (database) handling library, provides database connectivity to different database backends and various other helper utils.