Wt
4.11.1
|
Default traits for a class mapped with Wt::Dbo. More...
Public Types | |
typedef long long | IdType |
Type of the primary key. More... | |
Static Public Member Functions | |
static IdType | invalidId () |
Returns the sentinel value for a null id. More... | |
static const char * | surrogateIdField () |
Returns the database field name for the surrogate primary key. More... | |
static const char * | versionField () |
Configures the optimistic concurrency version field. More... | |
Default traits for a class mapped with Wt::Dbo.
This class provides the default traits. It is convenient (and future proof) to inherit these default traits when customizing the traits for one particular class.
typedef long long Wt::Dbo::dbo_default_traits::IdType |
Type of the primary key.
The default corresponds to a surrogate key, which is long long
.
|
static |
Returns the sentinel value for a null
id.
The default implementation returns -1.
|
static |
Returns the database field name for the surrogate primary key.
The default surrogate id database field name is "id"
.
|
static |
Configures the optimistic concurrency version field.
By default, optimistic concurrency locking is enabled using a "version"
field.