blob: e7774a76f4ef31ae29522a4e3e6c2fc3d5c928a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
// file : common/relationship/on-delete/test.hxx
// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef TEST_HXX
#define TEST_HXX
#include <vector>
#include <odb/core.hxx>
#pragma db object
struct object
{
#pragma db id auto
unsigned long id;
};
#pragma db object
struct cascade
{
#pragma db id auto
unsigned long id;
#pragma db on_delete(cascade)
object* p;
};
#pragma db object
struct cascade_cont
{
#pragma db id auto
unsigned long id;
#pragma db on_delete(cascade)
std::vector<object*> p;
};
#pragma db object
struct set_null
{
#pragma db id auto
unsigned long id;
#pragma db on_delete(set_null)
object* p;
};
#pragma db object
struct set_null_cont
{
#pragma db id auto
unsigned long id;
#pragma db on_delete(set_null)
std::vector<object*> p;
};
#endif // TEST_HXX
|