From c6019273a7564be9ed772d45aa95e09aaff37a23 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 30 Apr 2021 12:06:15 +0200 Subject: Add transaction::connection(database&) overload --- odb/pgsql/database.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'odb/pgsql/database.cxx') diff --git a/odb/pgsql/database.cxx b/odb/pgsql/database.cxx index 51752d7..b4d3732 100644 --- a/odb/pgsql/database.cxx +++ b/odb/pgsql/database.cxx @@ -282,7 +282,9 @@ namespace odb cp = factory_->connect (); pgsql::connection& c ( - cp != 0 ? *cp : transaction::current ().connection ()); + cp != 0 + ? *cp + : transaction::current ().connection (const_cast (*this))); // If we are in the user's transaction then things are complicated. When // we try to execute SELECT on a non-existent table, PG "poisons" the -- cgit v1.1