diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-07-20 14:26:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-07-27 10:30:15 +0200 |
commit | adfa9bbd04cd3571932ee7675344ca723bfa1eab (patch) | |
tree | c47487e8253d71ce0f2dd2e360f872e1e59a6cef /odb/relational/model.hxx | |
parent | 526f66e63f23afb40cc01550ca1a3a3592a84254 (diff) |
Move indexes from model scope to table scope
Conceptually, indexes belong to tables and some databases (MySQL, MSSQL)
indeed treat them as such (i.e., you can have indexes with the same name
in different tables).
Diffstat (limited to 'odb/relational/model.hxx')
-rw-r--r-- | odb/relational/model.hxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/odb/relational/model.hxx b/odb/relational/model.hxx index d41b701..b95425e 100644 --- a/odb/relational/model.hxx +++ b/odb/relational/model.hxx @@ -471,9 +471,7 @@ namespace relational id_name += '_'; model_.new_edge<sema_rel::unames> (t, fk, id_name + "fk"); - - model_.new_edge<sema_rel::qnames> ( - model_, in, name + "_" + id_name + "i"); + model_.new_edge<sema_rel::unames> (t, in, id_name + "i"); } // index (simple value) @@ -492,8 +490,7 @@ namespace relational model_.new_edge<sema_rel::contains> ( in, dynamic_cast<column&> (t.find (col_name)->nameable ())); - model_.new_edge<sema_rel::qnames> ( - model_, in, name + "_" + col_name + "_i"); + model_.new_edge<sema_rel::unames> (t, in, col_name + "_i"); } // key |