session progress
This commit is contained in:
@@ -135,7 +135,11 @@ private:
|
||||
|
||||
template<typename ValueType>
|
||||
void object_generator::on_primary_key(const char *id, ValueType &x, const utils::primary_key_attribute& attr) {
|
||||
auto &ref = emplace_attribute<ValueType>(id, { attr.size(), utils::constraints::PrimaryKey }, null_option_type::NotNull);
|
||||
utils::constraints cs = utils::constraints::PrimaryKey;
|
||||
if (attr.generator() == utils::generator_type::Identity) {
|
||||
cs |= utils::constraints::Identity;
|
||||
}
|
||||
auto &ref = emplace_attribute<ValueType>(id, { attr.size(), cs }, null_option_type::NotNull);
|
||||
prepare_primary_key(ref, utils::identifier(x));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user