From 36920a538c7b207c0b36b2270108a717479e0ed1 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov The object id can be of a simple or composite (Section
7.2.1, "Composite Object Ids") value type. This type should be
- default-constructible. It is also possible to declare a persistent
- class without an object id, however, such a class will have limited
- functionality (Section 14.1.6,
- "no_id
").no_id
").
The above two pragmas are the minimum required to declare a persistent class with an object id. Other pragmas can be used to @@ -7953,7 +7953,8 @@ class person
However, a value type that can be used as an object id has a number
of restrictions. Such a value type cannot have container, object
pointer, or read-only data members. It also must be
- default-constructible. Furthermore, if the persistent class in which
+ default-constructible, copy-constructible, and copy-assignable.
+ Furthermore, if the persistent class in which
this composite value type is used as object id has session support
enabled (Chapter 11, "Session"), then it must also
implement the less-than comparison operator (operator<
).