delete many to many progress
This commit is contained in:
@@ -105,6 +105,7 @@ public:
|
||||
void on_foreign_key(const char *id, Pointer &/*x*/) {
|
||||
const auto type = pk_type_determinator::determine<typename Pointer::value_type>();
|
||||
auto &ref = object_->attributes_.emplace_back(id, type, utils::constraints::ForeignKey, null_option_type::NotNull);
|
||||
ref.index_ = object_->attributes_.size() - 1;
|
||||
ref.owner_ = object_;
|
||||
}
|
||||
template<class ContainerType>
|
||||
|
||||
@@ -373,7 +373,9 @@ void schema_observer<Type>::on_attach(const object::repository_node &node, const
|
||||
auto producer = std::make_unique<query_object_resolver_producer<Type>>(schema_, it->second.table(), it->second.node().info().primary_key_attribute()->name());
|
||||
schema_.resolver_producers_[typeid(Type)] = std::move(producer);
|
||||
} else {
|
||||
object::join_columns_collector collector;
|
||||
const auto it = schema_.insert_relation_table(typeid(Type), node);
|
||||
// auto producer = std::make_unique<query_object_resolver_producer<Type>>(schema_, it->second.table(), it->second.node().info().primary_key_attribute()->name());
|
||||
// schema_.resolver_producers_[typeid(Type)] = std::move(producer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
table(const char *name); // NOLINT(*-explicit-constructor)
|
||||
table(const std::string& name); // NOLINT(*-explicit-constructor)
|
||||
table(const std::string& name, const std::vector<table_column>& columns);
|
||||
table(const std::string& name, const std::vector<table_column>& columns, const std::string& join_column, const std::string& inverse_join_column);
|
||||
table(const table& other);
|
||||
table& operator=(const table& other);
|
||||
table(table&& other) noexcept;
|
||||
@@ -44,11 +45,11 @@ public:
|
||||
[[nodiscard]] bool has_primary_key() const;
|
||||
|
||||
[[nodiscard]] const table_column* primary_key_column() const;
|
||||
[[nodiscard]] const std::string& join_column_name() const;
|
||||
[[nodiscard]] const std::string& inverse_join_column_name() const;
|
||||
[[nodiscard]] const table_column* join_column() const;
|
||||
[[nodiscard]] const table_column* inverse_join_column() const;
|
||||
|
||||
protected:
|
||||
table(std::string name, std::string alias, const std::vector<table_column>& columns);
|
||||
table(std::string name, std::string alias, const std::vector<table_column>& columns);
|
||||
|
||||
private:
|
||||
friend table_column;
|
||||
@@ -60,8 +61,8 @@ private:
|
||||
std::vector<table_column> columns_;
|
||||
|
||||
int pk_column_index_{-1};
|
||||
std::string join_column_name_;
|
||||
std::string inverse_join_column_name_;
|
||||
int join_column_index_{-1};
|
||||
int inverse_join_column_index_{-1};
|
||||
};
|
||||
|
||||
template<typename Type = table>
|
||||
|
||||
Reference in New Issue
Block a user