fixed restriction and constraint class to use size_t
This commit is contained in:
@@ -30,7 +30,7 @@ void object_generator::create_pk_constraint(const std::string &name) const {
|
||||
if (pk_attr == std::end(object_->attributes_)) {
|
||||
return;
|
||||
}
|
||||
restriction pk_constraint(*pk_attr);
|
||||
restriction pk_constraint(pk_attr->index());
|
||||
pk_constraint.options_ |= utils::constraints::PrimaryKey;
|
||||
pk_constraint.owner_ = object_;
|
||||
object_->constraints_.emplace_back(std::move(pk_constraint));
|
||||
@@ -41,7 +41,7 @@ void object_generator::create_unique_constraint(const std::string &name) const {
|
||||
if (pk_attr == std::end(object_->attributes_)) {
|
||||
return;
|
||||
}
|
||||
restriction pk_constraint(*pk_attr);
|
||||
restriction pk_constraint(pk_attr->index());
|
||||
pk_constraint.options_ |= utils::constraints::Unique;
|
||||
pk_constraint.owner_ = object_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user