aboutsummaryrefslogtreecommitdiff
path: root/libbrep/package.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbrep/package.hxx')
-rw-r--r--libbrep/package.hxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/libbrep/package.hxx b/libbrep/package.hxx
index 1927298..38ca0ec 100644
--- a/libbrep/package.hxx
+++ b/libbrep/package.hxx
@@ -607,15 +607,36 @@ namespace brep
// requirements
//
- #pragma db member(requirement_key::outer) column("requirement_index")
- #pragma db member(requirement_key::inner) column("index")
+ // Note that this is a 2-level nested container which is mapped to three
+ // container tables each containing data of each dimension.
+ // Container of the requirement_alternatives values.
+ //
#pragma db member(requirements) id_column("") value_column("")
+
+ // Container of the requirement_alternative values.
+ //
+ #pragma db member(requirement_alternative_key::outer) column("requirement_index")
+ #pragma db member(requirement_alternative_key::inner) column("index")
+
#pragma db member(requirement_alternatives) \
virtual(requirement_alternatives_map) \
after(requirements) \
get(odb::nested_get (this.requirements)) \
set(odb::nested_set (this.requirements, std::move (?))) \
+ id_column("") key_column("") value_column("")
+
+ // Container of the requirement (string) values.
+ //
+ #pragma db member(requirement_key::outer) column("requirement_index")
+ #pragma db member(requirement_key::middle) column("alternative_index")
+ #pragma db member(requirement_key::inner) column("index")
+
+ #pragma db member(requirement_alternative_requirements) \
+ virtual(requirement_alternative_requirements_map) \
+ after(requirement_alternatives) \
+ get(odb::nested2_get (this.requirements)) \
+ set(odb::nested2_set (this.requirements, std::move (?))) \
id_column("") key_column("") value_column("id")
// tests