fixed core- and orm-tests. postgres-tests needs some work

This commit is contained in:
Sascha Kühl
2025-11-20 15:35:40 +01:00
parent 95c555d03a
commit 3f3773dc71
17 changed files with 170 additions and 139 deletions
+8 -7
View File
@@ -21,18 +21,19 @@ public:
auto node = std::shared_ptr<repository_node>(new repository_node(repo, name, typeid(Type)));
primary_key_resolver resolver;
auto obj = std::make_shared<object_definition>(name);
// auto obj = std::make_shared<object_definition>(name);
auto pk_info = resolver.resolve<Type>();
auto ref_column = determine_reference_column(typeid(Type), name, pk_info, repo);
const auto attributes = attribute_definition_generator::generate<Type>(repo);
for (auto&& attr : attributes) {
obj->append(std::move(attr));
}
// for (auto&& attr : attributes) {
// obj->append(std::move(attr));
// }
auto info = std::make_unique<object_info<Type>>(
node,
attributes,
std::move(pk_info.pk),
ref_column,
obj,
// obj,
[]{ return std::make_unique<Type>(); }
);
node->info_ = std::move(info);
@@ -50,7 +51,7 @@ public:
auto obj = creator();
auto info = std::make_unique<object_info<Type>>(
result.value(),
std::make_shared<object_definition>(attribute_definition_generator::generate(*obj, repo)),
attribute_definition_generator::generate(*obj, repo),
std::move(creator)
);
result.value()->info_ = std::move(info);
@@ -94,7 +95,7 @@ private:
static utils::result<node_ptr, utils::error> make_and_attach_node(repository& repo, const std::string& name, const std::type_index& ti);
static std::shared_ptr<attribute_definition> determine_reference_column(const std::type_index& ti,
const std::shared_ptr<object_definition>& obj,
const std::string& table_name,
const primary_key_info& pk_info,
repository& repo);