aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-15 08:35:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-15 08:35:40 +0200
commit30973a12ba53aeb13780c9a5b2dfdc43bd356f56 (patch)
tree0c9cd456cd31d3d809d236918b0e66f37b64dbf2 /odb
parente88da1009d5dc2bc1f87d95bf41940b9ad6a494f (diff)
Check version dependencies for polymorphic bases
Diffstat (limited to 'odb')
-rw-r--r--odb/validator.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/odb/validator.cxx b/odb/validator.cxx
index 22a31d1..1a025a0 100644
--- a/odb/validator.cxx
+++ b/odb/validator.cxx
@@ -1046,9 +1046,14 @@ namespace
virtual void
traverse_object (semantics::class_& c)
{
- /*
- @@ TODO
-
+ // For reuse inheritance we allow the base to be soft-deleted. In
+ // a sense, it becomes like an abstract class with the added
+ // functionality of being able to load old data.
+ //
+ // For polymorphism inheritance things are a lot more complicated
+ // and we don't allow a base to be soft-deleted since there is a
+ // link (foreign key) from the derived table.
+ //
semantics::class_* poly (polymorphic (c));
if (poly != 0 && poly != &c)
{
@@ -1056,7 +1061,6 @@ namespace
check_strict (
c, base, "polymorphic derived object", "polymorphic base");
}
- */
// Don't go into bases.
//