fixed: a parent key was not properly set to simple childs (insert statements)

fixed: a parent key was not set in list of childs (insert statements)




git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1215 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2019-09-24 17:08:45 +00:00
parent cff4c1518e
commit 334201fe15
8 changed files with 322 additions and 60 deletions

View File

@@ -37,6 +37,8 @@
#include <string>
#include "morm.h"
#include "type.h"
namespace morm
@@ -47,7 +49,7 @@ namespace samples
/*
CREATE TABLE public.attachment (
id bigserial,
bigint person_id,
person_id bigint,
name varchar(64),
content text,
some_flags bool,
@@ -67,22 +69,25 @@ public:
long person_id;
std::wstring name;
std::string content;
std::vector<Type> types;
bool some_flags;
PT::Date created_date;
Language language;
void map_fields()
{
field(L"id", id, false, false, true);
field(L"person_id", person_id);
field(L"name", name);
field(L"content", content);
field(L"attachment_id", L"types", types);
//field(L"types", types);
field(L"some_flags", some_flags);
field(L"created_date", created_date);
field(L"language_id", L"language", language);
}
void table_name(PT::TextStream & stream)
{
// schema.table_name or just table_name