summaryrefslogtreecommitdiff
path: root/odb/context.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/context.hxx')
-rw-r--r--odb/context.hxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/odb/context.hxx b/odb/context.hxx
index dde1d72..bc8a8bf 100644
--- a/odb/context.hxx
+++ b/odb/context.hxx
@@ -55,7 +55,10 @@ public:
static bool
comp_value (semantics::class_& c)
{
- return c.count ("value") && !c.count ("type");
+ if (c.count ("composite-value"))
+ return c.get<bool> ("composite-value");
+ else
+ return comp_value_ (c);
}
// Return the class object if this type is a composite value type
@@ -65,7 +68,7 @@ public:
comp_value (semantics::type& t)
{
semantics::class_* c (dynamic_cast<semantics::class_*> (&t));
- return c != 0 && t.count ("value") && !t.count ("type") ? c : 0;
+ return c != 0 && comp_value (*c) ? c : 0;
}
static bool
@@ -97,6 +100,12 @@ public:
: 0;
}
+ static bool
+ unordered (semantics::data_member& m)
+ {
+ return m.count ("unordered") || m.type ().count ("unordered");
+ }
+
// Database names and types.
//
public:
@@ -215,6 +224,10 @@ public:
static bool
has_a (semantics::type&, unsigned short flags);
+private:
+ static bool
+ comp_value_ (semantics::class_&);
+
protected:
struct data;
typedef cutl::shared_ptr<data> data_ptr;