From c12e7cba18fe4163563f1428626950a68a5d01d6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Oct 2011 15:16:49 +0200 Subject: Add support for persistent classes without object ids New pragma id (object). New test: common/no-id. --- common/no-id/test.hxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 common/no-id/test.hxx (limited to 'common/no-id/test.hxx') diff --git a/common/no-id/test.hxx b/common/no-id/test.hxx new file mode 100644 index 0000000..3508d88 --- /dev/null +++ b/common/no-id/test.hxx @@ -0,0 +1,23 @@ +// file : common/no-id/test.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef TEST_HXX +#define TEST_HXX + +#include + +#include + +#pragma db object id() +struct object +{ + object () {} + object (unsigned long n, const std::string& s): num (n), str (s) {} + + unsigned long num; + std::string str; +}; + +#endif // TEST_HXX -- cgit v1.1