From c17f5ff5b2f1523e92e048623f51638f83b34022 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 15 Sep 2013 13:43:39 +0200 Subject: Diagnose change of polymorphic base, table kind --- odb/relational/schema.hxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'odb/relational/schema.hxx') diff --git a/odb/relational/schema.hxx b/odb/relational/schema.hxx index 3edb6b2..93850a6 100644 --- a/odb/relational/schema.hxx +++ b/odb/relational/schema.hxx @@ -377,9 +377,7 @@ namespace relational } else { - if (migration && - t.extra ().count ("kind") != 0 && - t.extra ()["kind"] == "polymorphic") + if (migration && t.extra ()["kind"] == "polymorphic derived object") { // If we are dropping a polymorphic derived object, then we // also have to clean the base tables. Note that this won't @@ -416,7 +414,7 @@ namespace relational assert (rkey.contains_size () == dkey.contains_size ()); delete_ (p->name (), t.name (), rkey, dkey); } - while (p->extra ().count ("kind") != 0); + while (p->extra ()["kind"] != "polymorphic root object"); } drop (t, migration); -- cgit v1.1