summaryrefslogtreecommitdiff
path: root/odb/relational/schema.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-12-04 11:30:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-12-04 11:30:33 +0200
commit3417fc7c0df3b1b01750874587c4f3bb2ef02f45 (patch)
treea35f2439f7f72212d8ad05d3b8175e992d9a917f /odb/relational/schema.hxx
parenta0bf13c2522cc9c029af53f40970a3d0c19e178f (diff)
Implement on_delete pragma for object pointers
Translates to the ON DELETE SQL clause.
Diffstat (limited to 'odb/relational/schema.hxx')
-rw-r--r--odb/relational/schema.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/odb/relational/schema.hxx b/odb/relational/schema.hxx
index 0de7036..4903e3a 100644
--- a/odb/relational/schema.hxx
+++ b/odb/relational/schema.hxx
@@ -857,14 +857,20 @@ namespace relational
switch (a)
{
+ case foreign_key::no_action:
+ break;
case foreign_key::cascade:
{
os << endl
<< " ON DELETE CASCADE";
break;
}
- case foreign_key::no_action:
- break;
+ case foreign_key::set_null:
+ {
+ os << endl
+ << " ON DELETE SET NULL";
+ break;
+ }
}
}