From ef8f7785d03ccd4be9a4819751d8bda372e5656a Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Fri, 9 Apr 2021 23:41:45 +0000 Subject: [PATCH] Update warning text for cascade_backrefs=False --- lib/sqlalchemy/orm/unitofwork.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py index 1fb1c10acf..f2b5cf75f8 100644 --- a/lib/sqlalchemy/orm/unitofwork.py +++ b/lib/sqlalchemy/orm/unitofwork.py @@ -26,7 +26,8 @@ def _warn_for_cascade_backrefs(state, prop): '"%s" object is being merged into a Session along the backref ' 'cascade path for relationship "%s"; in SQLAlchemy 2.0, this ' "reverse cascade will not take place. Set cascade_backrefs to " - "False for the 2.0 behavior; or to set globally for the whole " + "False in either the relationship() or backref() function for " + "the 2.0 behavior; or to set globally for the whole " "Session, set the future=True flag" % (state.class_.__name__, prop) ) -- 2.47.2