aboutsummaryrefslogtreecommitdiff
path: root/common/readonly/test.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-26 17:16:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-26 17:16:24 +0200
commit6a3ddb6bd80f3c0c4d7b6957cb7be1f3d8713720 (patch)
tree1d65d67de11b8f803a2eac496b483a8c1d2bb7e8 /common/readonly/test.hxx
parentd073555e513e671b197c5eb31c0b2b269f137d0f (diff)
Add test for readonly object with auto id
Diffstat (limited to 'common/readonly/test.hxx')
-rw-r--r--common/readonly/test.hxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/common/readonly/test.hxx b/common/readonly/test.hxx
index a29a2bd..0b73d94 100644
--- a/common/readonly/test.hxx
+++ b/common/readonly/test.hxx
@@ -10,7 +10,7 @@
#include <odb/core.hxx>
-// Simple readonly value.
+// Simple readonly object.
//
#pragma db object
struct simple
@@ -209,4 +209,18 @@ struct wrapper
const std::auto_ptr<const unsigned long> cpcl;
};
+// Readonly object with auto id.
+//
+#pragma db object readonly
+struct ro_auto
+{
+ ro_auto (unsigned long n): num (n) {}
+ ro_auto () {}
+
+ #pragma db id auto
+ unsigned long id;
+
+ unsigned long num;
+};
+
#endif // TEST_HXX